When copying an item out of secure storage and into the regular file system
truecrypt will sometimes report that the file operation failed. When in fact the
operation was a complete success. Add a check to make sure truecrypt is correct.
Change-Id: I1520455a9ce9dc403f2ca6fb50cf1a4f8604bc64
try {
TFile.mv(s, d, SecureConsole.DETECTOR);
} catch (IOException ex) {
- throw new ExecutionException("Failed to rename file or directory", ex);
+ // Make sure truecrypt was right
+ // There's a strange bug in it where it thinks that a file did not
+ // move over. However, it actually did.
+ if (!d.exists()) {
+ throw new ExecutionException("Failed to rename file or directory", ex);
+ }
}
}