feat: make cross device moves possible

This commit is contained in:
Jan Bader
2025-01-03 00:26:43 +01:00
parent 051e257fba
commit 6c38703cf2
2 changed files with 41 additions and 1 deletions

View File

@@ -230,7 +230,7 @@ func handleExistingFile(cfg config, fileExistsResponse FileExistsResult) error {
subfolder := fmt.Sprintf("%s %s - %s.%s", date.Format("20060102"), corr, itemName, extension)
newPath := filepath.Join(curDir, subfolder)
if err := os.Rename(fileExistsResponse.File, newPath); err != nil {
if err := MoveFile(fileExistsResponse.File, newPath); err != nil {
return fmt.Errorf("move file: %w", err)
}