Fixed cleanup bug which could cause problems for ArbitraryDataWriter

This commit is contained in:
CalDescent 2021-12-30 15:50:14 +00:00
parent 4d4f661548
commit 37edebcad9

View File

@ -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;