Permalink
Browse files

Added mkdirs in TDDatabase.replaceWithDatabase. This was crashing my …

…android 4.0 device without it, deleteRecursive deletes the containing folder and it was throwing an IOException.

Tidied up a spelling mistake I noticed
  • Loading branch information...
1 parent ade012c commit 396d9eb7b1ea54c09e58c827d7fc764c61613311 unknown committed Jul 30, 2012
@@ -206,6 +206,7 @@ public boolean replaceWithDatabase(String databasePath, String attachmentsPath)
FileDirUtils.copyFile(sourceFile, destFile);
File attachmentsFile = new File(dstAttachmentsPath);
FileDirUtils.deleteRecursive(attachmentsFile);
+ attachmentsFile.mkdirs();
if(attachmentsPath != null) {
FileDirUtils.copyFolder(new File(attachmentsPath), attachmentsFile);
}
@@ -229,7 +229,7 @@ public void process(HttpRequest request,
}
}
}
- Log.v(TDDatabase.TAG, "Chagne tracker run loop exiting");
+ Log.v(TDDatabase.TAG, "Change tracker run loop exiting");
}
public boolean receivedChunk(String line) {

0 comments on commit 396d9eb

Please sign in to comment.