File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
app/logbook/inmemory/src/main/java/org/phoebus/applications/logbook Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 2323import java .io .InputStream ;
2424import java .net .URLConnection ;
2525import java .nio .file .Files ;
26+ import java .nio .file .StandardCopyOption ;
2627import java .time .Instant ;
2728import java .util .Arrays ;
2829import java .util .Collection ;
@@ -128,7 +129,7 @@ public LogEntry set(LogEntry log) {
128129 ext = file .getName ().substring (i );
129130 }
130131 File tempFile = File .createTempFile (prefix , ext );
131- Files .copy (file .toPath (), tempFile .toPath ());
132+ Files .copy (file .toPath (), tempFile .toPath (), StandardCopyOption . REPLACE_EXISTING );
132133 tempFile .deleteOnExit ();
133134 String mimeType = URLConnection .guessContentTypeFromName (tempFile .getName ());
134135 return AttachmentImpl .of (tempFile , mimeType != null ? mimeType : ext , false );
You can’t perform that action at this time.
0 commit comments