Fix copy paste error

This commit is contained in:
crschnick 2023-12-30 07:09:22 +00:00
parent aee414f27d
commit 815787c8a9
2 changed files with 5 additions and 0 deletions

View file

@ -200,6 +200,10 @@ public class FileSystemHelper {
var sourceFile = source.getPath();
var targetFile = FileNames.join(target.getPath(), FileNames.getFileName(sourceFile));
if (sourceFile.equals(targetFile)) {
return;
}
if (source.getKind() == FileKind.DIRECTORY && target.getFileSystem().directoryExists(targetFile)) {
throw ErrorEvent.unreportable(new IllegalArgumentException("Target directory " + targetFile + " does already exist"));
}

View file

@ -19,5 +19,6 @@
- Fix some shells not properly setting up the PATH
- Fix git vault repository throwing initialization errors when shared with multiple Windows user permissions
- Fix copying and pasting a file into the same directory returning an error
- Fix connections being accidentally listed under scripts category
if they were added while scripts category was selected