Skip to content

Commit

Permalink
Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SirSparkles committed Mar 18, 2018
1 parent 75dc3f0 commit 48106f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion TVRename#/Forms/UI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3193,7 +3193,7 @@ private void Revert(bool checkedNotSelected)
{
if (!(a is ActionCopyMoveRename i1)) continue;

if (i1.From.RemoveExtension().StartsWith(i2.From.RemoveExtension()))
if (i1.From.RemoveExtension(true).StartsWith(i2.From.RemoveExtension(true)))
{
toRemove.Add(i1);

Expand Down
6 changes: 4 additions & 2 deletions TVRename#/Utility/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,11 @@ public static string NormalizePath(this string path)
.ToUpperInvariant();
}

public static string RemoveExtension(this FileInfo file)
public static string RemoveExtension(this FileInfo file, bool useFullPath = false)
{
return file.FullName.Substring(0, file.FullName.Length - file.Extension.Length);
string root = useFullPath ? file.FullName : file.Name;

return root.Substring(0, root.Length - file.Extension.Length);
}

public static void GetFilmDetails(this FileInfo movieFile)
Expand Down

0 comments on commit 48106f2

Please sign in to comment.