Skip to content

Commit

Permalink
Shared - Better TagToFilename With New Dir Char
Browse files Browse the repository at this point in the history
  • Loading branch information
nlogozzo committed Nov 7, 2023
1 parent 7897805 commit fbcd9a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion NickvisionTagger.Shared/Models/MusicFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static MusicFile()
{
_invalidSystemFilenameCharacters.Remove('\\');
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
else
{
_invalidSystemFilenameCharacters.Remove('/');
_invalidWindowsFilenameCharacters.Remove('/');
Expand Down Expand Up @@ -887,6 +887,10 @@ public bool TagToFilename(string formatString)
{
replace = PublishingDate == DateTime.MinValue ? "" : PublishingDate.ToShortDateString();
}
if(!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && LimitFilenameCharacters)
{
replace = replace.Replace('/', '_');
}
formatString = formatString.Replace(match.Value, replace);
}
else if (customProps.Contains(value))
Expand Down

0 comments on commit fbcd9a3

Please sign in to comment.