* 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))
|
||||
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
|
||||
renameMap.put(mapping.getKey(), mapping.getValue());
|
||||
destinationSet.add(destination);
|
||||
|
|
Loading…
Reference in New Issue