Skip to content
Snippets Groups Projects
Commit 63985520 authored by Boris Grozev's avatar Boris Grozev
Browse files

Also throws an exception if rename fails.

parent 90a86d7c
No related branches found
No related tags found
No related merge requests found
......@@ -203,6 +203,8 @@ private void failsafeCopy(String from, String to)
out.close();
// once done, rename the partial file to the final copy
ptoF.renameTo(toF);
if (!ptoF.renameTo(toF))
throw new IOException("Failed to rename " + ptoF.getName() + " to"
+ toF.getName());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment