diff --git a/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/filesharing/FileSystemService.java b/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/filesharing/FileSystemService.java index 7a0f9a77..fffb7196 100644 --- a/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/filesharing/FileSystemService.java +++ b/service/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/service/filesharing/FileSystemService.java @@ -53,7 +53,10 @@ private boolean moveFile(String destinationName, Path sourceFile, String queryId try { LOG.info("Moving query {} to file: {}", queryId, filePath); makeDirIfDNE(dirPath); - Path result = Files.move(sourceFile, filePath, REPLACE_EXISTING); + Path result = Files.copy(sourceFile, filePath, REPLACE_EXISTING); + // we have to copy and then delete because of how mv works with mounted drives + // (it doesn't work) + Files.delete(sourceFile); return Files.exists(result); } catch (IOException e) { LOG.error("Error moving.", e);