Skip to content

Commit

Permalink
Fix Bug (Renaming failed)
Browse files Browse the repository at this point in the history
Bug:
File.Exists() seems not to be case sensitive. Hence renaming to the same name with a different capitalization will wrongly say that that file name is already occupied.
  • Loading branch information
Sogolumbo committed Sep 19, 2020
1 parent 28fdc20 commit a22933d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PlaylistSyncLib/MusicLibraryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public virtual string Name
}
}
}
else if (File.Exists(DirectoryPath + "\\" + value))
else if (File.Exists(DirectoryPath + "\\" + value) && (value.ToLower() != _name.ToLower()))
{
FireFileNameAlreadyExists(this, new FileNameAlreadyExistsEventArgs(_name, value));
return;
Expand Down

0 comments on commit a22933d

Please sign in to comment.