wwivbbs/wwiv

WWIVbasic scripts not finding json because of filename case differences

Closed this issue · 4 comments

WWIV Bulletin Board System [5.9.0.3696]
OS: linux debian 10

When I updated from 5.8.0.3549 to 5.9.0.3696, I noticed that oneliners was running, but wasn't finding the existing entries in the json file. Bumped up to --v=3 and found the following:

2023-06-28 10:19:10,995 INFO  Running basic script: oneliners.bas
2023-06-28 10:19:11,057 VER-3 ReadFileIntoString:
2023-06-28 10:19:11,138 VER-3 JSON File does not exist: /bbs/wwiv/data/ONELINERS.script.json

As you can see, it's looking for an uppercase script name, not lowercase; so it's munging this somewhere.

wwiv commented

is the file on disk ONELINERS.script.json?

Can you rty with the latest 5.8 on jenkins too please to help narrow down where it broke?

wwiv commented

I suspect it's this change c67c0bc but that was in 5.8 so wanted to confirm where we need to fix (5.8 and 5.9 or just 5.9)

If so, the fix would be localized to

const auto path = FilePath(datadir, StrCat(base, ".script.json"));
where we should always lower case filenames before IO

the file on disk is all lowercase: oneliners.script.json

I was able to symlink as a workaround, so that's something at least. I'll see if I can try 5.8 for comparison. Do you know what the latest 5.8 is on jenkins?

confirmed this is working now.