Sorrow446/SberZvuk-Downloader

Dots in folder name

lexxxxion opened this issue · 4 comments

On Windows, is there is an ellipsis (three dots) in the album name, it is omitted when the folder is created. Then the script fails to locate it.

… is an allowed character in Windows file and folder names. Could you link the album?

Sorry, it turns out, those are three separate dots, not ellipsis. But the problem still exists, dots can be used in file names, but not folder names. Windows omits them automatically, but the app tries to address the folder, as if the dots were still there.

Yeah, filenames and folders can't end with periods in Windows. strings.TrimSuffix would do the job. Will implement soon.

Something like:
From:

albumPath := filepath.Join(cfg.OutPath, sanitize(albumFolder))

To:

albumPath := filepath.Join(cfg.OutPath, strings.TrimSuffix(sanitize(albumFolder), "."))

Fix implemented.