Fix crash when pasting into directory without permissions (#2024)
This commit is contained in:
1 parent
0639e71171
commit
e47b2fda08
2 files changed
+8
-9
No files matched your search
@@ -104,8 +104,7 @@ func copyAll(srcs []string, dstDir string, preserve []string) (nums chan int64,
|
||||
file := filepath.Base(src)
|
||||
dst := filepath.Join(dstDir, file)
|
||||
|
||||
lstat, err := os.Lstat(dst)
|
||||
if !os.IsNotExist(err) {
|
||||
if lstat, err := os.Lstat(dst); err == nil {
|
||||
ext := getFileExtension(lstat)
|
||||
basename := file[:len(file)-len(ext)]
|
||||
var newPath string
|
||||
|
||||
Reference in new issue
Block a user