fanbox-dl icon indicating copy to clipboard operation
fanbox-dl copied to clipboard

Backspace control character (U+0008) in string breaks filepath.Join

Open S52968 opened this issue 8 months ago • 0 comments

I don't know why but Fanbox allows the backspace character in titles.

Line 83 of client.go has an error because filepath.Join() loses the slash when the previous string terminates with a backspace control character.

For example: filepath.Join("ab", "test.txt") is expected to result in ab/test.txt (since you can't see the backspace), but instead you get abtest.txt.

I think it's a bug in the package, but it can be circumvented by removing non-printable characters. I'm not a Go dev but I messed around a little bit and used this code: https://gosamples.dev/remove-non-printable-characters/ and got it to work.

S52968 avatar Jun 25 '24 00:06 S52968