diff options
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/util/FileUtil.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/util/FileUtil.java b/src/github/daneren2005/dsub/util/FileUtil.java index 3b45115b..4b425775 100644 --- a/src/github/daneren2005/dsub/util/FileUtil.java +++ b/src/github/daneren2005/dsub/util/FileUtil.java @@ -379,9 +379,13 @@ public class FileUtil { public static boolean verifyCanWrite(File dir) { if(ensureDirectoryExistsAndIsReadWritable(dir)) { try { - File tmp = File.createTempFile("tmp", "tmp", dir); - tmp.delete(); - return true; + File tmp = new File(dir, "tmp"); + if(tmp.createNewFile()) { + tmp.delete(); + return true; + } else { + return false; + } } catch(Exception e) { return false; } |