mirror of
https://github.com/Radarr/Radarr
synced 2025-01-03 13:54:29 +00:00
Fixed: Remove initial dot in filename (#4509)
This commit is contained in:
parent
cbcf3d1058
commit
bc838b74c7
2 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,8 @@ public class CleanFixture : CoreTest
|
|||
{
|
||||
[TestCase("Mission: Impossible - no [HDTV-720p]",
|
||||
"Mission Impossible - no [HDTV-720p]")]
|
||||
[TestCase(".45 (2006)", "45 (2006)")]
|
||||
[TestCase(" The Movie Title ", "The Movie Title")]
|
||||
public void CleanFileName(string name, string expectedName)
|
||||
{
|
||||
FileNameBuilder.CleanFileName(name).Should().Be(expectedName);
|
||||
|
|
|
@ -233,7 +233,7 @@ public static string CleanFileName(string name, bool replace = true, ColonReplac
|
|||
result = result.Replace(badCharacters[i], replace ? goodCharacters[i] : string.Empty);
|
||||
}
|
||||
|
||||
return result.Trim();
|
||||
return result.TrimStart(' ', '.').TrimEnd(' ');
|
||||
}
|
||||
|
||||
public static string CleanFolderName(string name)
|
||||
|
|
Loading…
Reference in a new issue