aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-09-03 19:00:00 -0700
committerScott Jackson <daneren2005@gmail.com>2014-09-03 19:00:00 -0700
commite0e766367b6a7fe1925fac368570665b465b87ac (patch)
tree69c8a62d72a18a5e2e535e1ba851d1bb13414963 /src
parent8713e83358d035766d420b968c808baa66d69591 (diff)
parent469734452b0e7a6badb69681bb00974a4050774e (diff)
downloaddsub-e0e766367b6a7fe1925fac368570665b465b87ac.tar.gz
dsub-e0e766367b6a7fe1925fac368570665b465b87ac.tar.bz2
dsub-e0e766367b6a7fe1925fac368570665b465b87ac.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/util/FileUtil.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/github/daneren2005/dsub/util/FileUtil.java b/src/github/daneren2005/dsub/util/FileUtil.java
index 7371b46b..b0657274 100644
--- a/src/github/daneren2005/dsub/util/FileUtil.java
+++ b/src/github/daneren2005/dsub/util/FileUtil.java
@@ -441,14 +441,20 @@ public class FileUtil {
public static boolean verifyCanWrite(File dir) {
if(ensureDirectoryExistsAndIsReadWritable(dir)) {
try {
- File tmp = new File(dir, "tmp");
- if(tmp.createNewFile()) {
- tmp.delete();
- return true;
+ File tmp = new File(dir, "checkWrite");
+ tmp.createNewFile();
+ if(tmp.exists()) {
+ if(tmp.delete()) {
+ return true;
+ } else {
+ Log.w(TAG, "Failed to delete temp file");
+ }
} else {
+ Log.w(TAG, "Temp file does not actually exist");
return false;
}
} catch(Exception e) {
+ Log.w(TAG, "Failed to create tmp file", e);
return false;
}
} else {