Merge branch 'claude/rate-limit-behavior-474ecf'

Strip only a trailing numeric suffix from blog folder names, fixing
zomb-eh_10 importing as blog 'zomb-eh0'.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
jim
2026-07-22 16:40:16 -05:00
co-authored by Claude Opus 4.8
+5 -10
View File
@@ -582,16 +582,11 @@ namespace URLNotesGrabberCORE
protected static string NormalizeBlogFolderName(string folderName)
{
return folderName
.Replace("_1", "")
.Replace("_2", "")
.Replace("_3", "")
.Replace("_4", "")
.Replace("_5", "")
.Replace("_6", "")
.Replace("_7", "")
.Replace("_8", "")
.Replace("_9", "");
// Archive tools suffix duplicate blog folders with _1, _2, ... _10 and beyond. Strip only a
// trailing numeric suffix: unanchored substring removal ate the "_1" inside "_10" and left the
// "0" welded to the name (zomb-eh_10 -> zomb-eh0), and mangled any blog whose real name
// contains "_1". A blog name is never a prefix of itself plus "_<digits>", so this is safe.
return System.Text.RegularExpressions.Regex.Replace(folderName, @"_\d+$", "");
}
static async Task FetchAndStoreReplyText(string blogName, long postID, long timestamp)