Copy and cut files

This commit is contained in:
Henrique Dias committed 2017-07-26 15:55:39 +01:00
1 parent 1673b9afa3
commit 64e70e39dc
19 files changed
+371 -2547

No files matched your search

+5 -1
View File
@@ -109,7 +109,11 @@ func (d Dir) Copy(src, dst string) error {
return os.ErrInvalid
}
info, err := d.Stat(src)
if dst == src {
return os.ErrInvalid
}
info, err := os.Stat(src)
if err != nil {
return err
}