This commit is contained in:
Daniel Goc
2026-04-03 11:44:15 +02:00
parent a988bbbc33
commit 1bab7f642f

View File

@@ -52,6 +52,7 @@ func (s *StorageService) Move(src_abs_path string, dest_abs_path string) error {
return responseErrors.ErrFileDoesNotExist
}
_, err = s.storageRepo.EntryInfo(dest_abs_path)
if err == nil {
return responseErrors.ErrNameTaken
} else if os.IsNotExist(err) {
@@ -66,6 +67,7 @@ func (s *StorageService) Copy(src_abs_path string, dest_abs_path string) error {
return responseErrors.ErrFileDoesNotExist
}
_, err = s.storageRepo.EntryInfo(dest_abs_path)
if err == nil {
return responseErrors.ErrNameTaken
} else if os.IsNotExist(err) {