Skip to content
Snippets Groups Projects
Unverified Commit 5f8e2f28 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

BUG: still buggy move files function

parent 6152f1fb
No related branches found
No related tags found
No related merge requests found
......@@ -307,7 +307,7 @@ public class FileUtils {
// must be stored somewhere until the transaction is done.
final File tmp =
File.createTempFile(target.getName(), Utils.getUID(), new File(FileSystem.getTmp()));
target.renameTo(tmp);
java.nio.file.Files.move(target.toPath(), tmp.toPath());
backup = tmp;
} else {
backup = null;
......@@ -322,7 +322,6 @@ public class FileUtils {
public void undo() {
try {
java.nio.file.Files.move(target.toPath(), file.toPath());
target.renameTo(file);
if (_backup != null) {
java.nio.file.Files.move(_backup.toPath(), target.toPath());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment