Changeset 1448 for trunk/src/org/expeditee/gui/Frame.java
- Timestamp:
- 11/12/19 15:39:05 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/Frame.java
r1445 r1448 20 20 21 21 import java.io.File; 22 import java.io.IOException; 23 import java.nio.file.Files; 24 import java.nio.file.Path; 22 25 import java.nio.file.Paths; 26 import java.nio.file.StandardCopyOption; 23 27 import java.sql.Time; 24 28 import java.util.ArrayList; … … 1096 1100 _redo.push(undo); 1097 1101 for(Item i : undo.items) { 1102 if (i instanceof org.expeditee.items.Picture) { 1103 String destination = ((org.expeditee.items.Picture) i).getPath(); 1104 Path destinationPath = Paths.get(destination); 1105 Path sourcePath = Paths.get(FrameIO.TRASH_PATH).resolve(destinationPath.getFileName()); 1106 try { 1107 Files.move(sourcePath, destinationPath, StandardCopyOption.ATOMIC_MOVE); 1108 } catch (IOException e) { 1109 MessageBay.displayMessage("Unable to restore image file from trash, not undoing deletion of image."); 1110 continue; 1111 } 1112 } 1098 1113 this.addItem(i); 1099 1114 reparse |= i.hasOverlay();
Note:
See TracChangeset
for help on using the changeset viewer.