Skip to content
Snippets Groups Projects
Commit 6fb87a7d authored by Grégory Mantelet's avatar Grégory Mantelet
Browse files

[UWS,TAP] Follow-up to the previous commit: apply the fix also for each user's

backup file.

The previous commit was only applied on the whole backup file.
parent 3441eb69
No related merge requests found
......@@ -706,8 +706,9 @@ public class LocalUWSFileManager implements UWSFileManager {
@Override
public OutputStream getBackupOutput(JobOwner owner) throws IllegalArgumentException, IOException{
File backupFile = new File(getOwnerDirectory(owner), getBackupFileName(owner));
File tempBackupFile = new File(getOwnerDirectory(owner), getBackupFileName(owner) + ".temp-" + System.currentTimeMillis());
createParentDir(backupFile);
return new FileOutputStream(backupFile);
return new OutputStreamWithCloseAction(new FileOutputStream(tempBackupFile), new RotateFileAction(tempBackupFile, backupFile));
}
/**
......
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