mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-16 14:25:02 -05:00
* don't allow file override so people can't mess up their stuff, but allow when src/dest path is the same, i.e. doesn't need any change, for usability reasons
This commit is contained in:
parent
41264f0045
commit
fc8f6bc7ef
@ -171,6 +171,9 @@ class RenameAction extends AbstractAction {
|
|||||||
if (destinationSet.contains(destination))
|
if (destinationSet.contains(destination))
|
||||||
throw new IllegalArgumentException("Conflict detected: " + mapping.getValue().getPath());
|
throw new IllegalArgumentException("Conflict detected: " + mapping.getValue().getPath());
|
||||||
|
|
||||||
|
if (destination.exists() && !resolveDestination(mapping.getKey(), mapping.getValue(), false).equals(mapping.getKey()))
|
||||||
|
throw new IllegalArgumentException("File already exists: " + mapping.getValue().getPath());
|
||||||
|
|
||||||
// use original mapping values
|
// use original mapping values
|
||||||
renameMap.put(mapping.getKey(), mapping.getValue());
|
renameMap.put(mapping.getKey(), mapping.getValue());
|
||||||
destinationSet.add(destination);
|
destinationSet.add(destination);
|
||||||
|
Loading…
Reference in New Issue
Block a user