From b1f95ac460828acd8b2a0901723f6d529fdd851a Mon Sep 17 00:00:00 2001 From: FongMi Date: Tue, 20 Feb 2024 13:59:28 +0800 Subject: [PATCH] Clean code --- .../src/main/java/com/github/catvod/utils/Path.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/catvod/src/main/java/com/github/catvod/utils/Path.java b/catvod/src/main/java/com/github/catvod/utils/Path.java index 08ff2e055..1c154a83e 100644 --- a/catvod/src/main/java/com/github/catvod/utils/Path.java +++ b/catvod/src/main/java/com/github/catvod/utils/Path.java @@ -194,17 +194,8 @@ public class Path { public static File create(File file) throws Exception { try { - if (!file.exists()) file.createNewFile(); if (!file.canWrite()) file.setWritable(true); - return chmod(file); - } catch (Exception e) { - e.printStackTrace(); - return file; - } - } - - public static File chmod(File file) { - try { + if (!file.exists()) file.createNewFile(); Shell.exec("chmod 777 " + file); return file; } catch (Exception e) {