Replay Mod (Fabric & Forge)

Replay Mod (Fabric & Forge)

1M Downloads

Crash when trying to cut or split a replay with a long name

Felix14-v2 opened this issue · 4 comments

commented
commented

Huge thanks!

commented

Hm, not entirely sure what the error means exactly but I noticed that the internal file name it is trying to access is 261 characters long (cause it encodes non-ascii characters as 4 ascii characters) and iirc there is a limit of 255 characters on file names in Windows.
Could you check if renaming the replay to something shorter fixes the issue? If so, I'll have to think of some way to abbreviate internal file names to prevent that from happening in the future.

commented

Indeed, the problem was in the long file name.
By the way, why not just save the source text? ReplayMod works well with such replays.
Снимок экрана 2021-06-28 091936

commented

By the way, why not just save the source text? ReplayMod works well with such replays.

Because certain characters (and sometimes even character combinations) are not allowed in file names. And which ones depends very much on the operating system and file system in use, with no reliable way to tell, so we cannot just blacklist those, instead we whitelist those which we know to definitely be OK (iirc a-z, A-Z, 0-9, _ and -). Though looking at how difficult this makes navigating the folder if you primarily use non-latin characters, I guess it's at least worth it to try the raw name before going the safe route. Opened #536 for that.