added test for file name normalization with leading dot

This commit is contained in:
Gani Georgiev
2025-12-19 16:26:31 +02:00
parent 94c4d4ec65
commit c2d6530065
3 changed files with 9 additions and 3 deletions

View File

@@ -207,6 +207,9 @@ func normalizeName(fr FileReader, name string) string {
}
// name
//
// note: leading dot is trimmed to prevent various subtle issues with files
// sync programs as they sometimes have special handling for "invisible" files
// ---
cleanName := inflector.Snakecase(strings.Trim(strings.TrimSuffix(name, originalExt), "."))
if length := len(cleanName); length < 3 {