Skip to content

Commit 5f504e3

Browse files
committed
Fix bug in duplicate file resolution
1 parent d038003 commit 5f504e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/peetseater/filesorter/ImagePanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public void actionPerformed(ActionEvent e) {
9595
Path desiredPath = destinationPath.resolve(currentImagePath.getFileName());
9696
int next = 1;
9797
while(Files.exists(desiredPath)) {
98-
destinationPath.resolve(next + "-" + currentImagePath.getFileName());
98+
desiredPath = destinationPath.resolve("copy-" + next + "-" + currentImagePath.getFileName());
9999
next++;
100100
}
101101
Files.move(currentImagePath, desiredPath, StandardCopyOption.ATOMIC_MOVE);

0 commit comments

Comments
 (0)