Browse Source

Fixed cleanup bug which could cause problems for ArbitraryDataWriter

qdn
CalDescent 3 years ago
parent
commit
37edebcad9
  1. 4
      src/main/java/org/qortal/arbitrary/ArbitraryDataFile.java

4
src/main/java/org/qortal/arbitrary/ArbitraryDataFile.java

@ -129,9 +129,9 @@ public class ArbitraryDataFile {
} }
// Or, if it's already in the data directory, we may need to move it // Or, if it's already in the data directory, we may need to move it
else if (!path.equals(arbitraryDataFile.getFilePath())) { else if (!path.equals(arbitraryDataFile.getFilePath())) {
// Wrong path, so relocate // Wrong path, so relocate (but don't cleanup, as the source folder may still be needed by the caller)
Path dest = arbitraryDataFile.getFilePath(); Path dest = arbitraryDataFile.getFilePath();
FilesystemUtils.moveFile(path, dest, true); FilesystemUtils.moveFile(path, dest, false);
} }
return arbitraryDataFile; return arbitraryDataFile;

Loading…
Cancel
Save