aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/util/FileUtil.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/util/FileUtil.java b/src/github/daneren2005/dsub/util/FileUtil.java
index 60fc6031..9433043c 100644
--- a/src/github/daneren2005/dsub/util/FileUtil.java
+++ b/src/github/daneren2005/dsub/util/FileUtil.java
@@ -478,8 +478,17 @@ public class FileUtil {
if(tmp.delete()) {
return true;
} else {
- Log.w(TAG, "Failed to delete temp file");
- return false;
+ Log.w(TAG, "Failed to delete temp file, retrying");
+
+ // This should never be reached since this is a file DSub created!
+ Thread.sleep(100L);
+ tmp = new File(dir, "checkWrite");
+ if(tmp.delete()) {
+ return true;
+ } else {
+ Log.w(TAG, "Failed retry to delete temp file");
+ return false;
+ }
}
} else {
Log.w(TAG, "Temp file does not actually exist");