Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
5.0.1
-
None
-
None
Description
Hello, due to a difference between mount points I think, the call to
public void moveFile(String file) {
after recording fails due to the impossibility of moving data from the tmp save to the final destination, as
f.renameTo fails
I replaced the f.renameTo with other code
try { File f = new File(this.tempFile); File fileOut = new File(file); fileOut.createNewFile(); Reader in = new FileReader(f); Writer out = new FileWriter(fileOut); IOUtils.copy(in,out); in.close(); out.close(); f.delete(); } catch (IOException e) { e.printStackTrace(); } //if (!f.renameTo()) LOG.e(LOG_TAG, "FAILED " + logMsg);
It seems to work properly, and is more generic, even if I had to add IOUtils ad dependency to use it (it can be even without, but there's more code).
If you prefer, I can join and patch the code with this, just to contribute.
Hope it helps