Skip to content

Commit 35e889a

Browse files
committed
Updated UDP, fixed crash when subdirectory's name gets cut and ends up with space, too long subdirectory names now end with '~' character
1 parent b6e088f commit 35e889a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

PatreonDownloader.Implementation/Helpers/PostSubdirectoryHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static string CreateNameFromPattern(PatreonCrawledUrl crawledUrl, string
3131
.Replace("%postid%", crawledUrl.PostId);
3232

3333
if (retString.Length > lengthLimit)
34-
retString = retString.Substring(0, lengthLimit);
34+
retString = $"{retString.Substring(0, lengthLimit - 1).Trim()}~";
3535

3636
return PathSanitizer.SanitizePath(retString);
3737
}

0 commit comments

Comments
 (0)