ID:2639141
 
Resolved
flist() failed in Windows on directories with trans-ASCII characters in their names.
BYOND Version:513
Operating System:Windows 10 Home 64-bit
Web Browser:Firefox 83.0
Applies to:Dream Daemon
Status: Resolved (513.1537)

This issue has been resolved.
Descriptive Problem Summary:
If any part of a path targeted by flist() contains certain characters (such as an accented é) it will fail to return the contents of the path.

I've not tested all other file-related operations, but was surprised to see fcopy() and fexists() seemed to function correctly even when flist() failed.

Numbered Steps to Reproduce Problem:
1: Place game's folder in a path containing an (é).
2: Run game that would try to use flist() to access files within its own directory.
3: No files get detected.

-1: Place game's folder in any path that only contains normal letters.
-2: Run the game.
-3: Files get detected as expected!

Expected Results:
flist("savefiles/") would return all my save files stored in a folder named "savefiles" when the game is run in any directory.

Actual Results:
flist("savefiles/") only returns my save files if I run the game in a directory that only contains regular characters.

Does the problem occur:
Every time? Or how often?
All the time.
In other games?
I've isolated it to the flist() call itself in a fresh environment so yes.
In other user accounts?
Yes assuming it's still running on a path containing applicable special characters.
On other computers?
Unable to test.
When does the problem NOT occur?
When you target flist() at a path that contains only regular characters.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
It was working on this computer a few years ago without issue in a directory containing an é, and had a project that could use flist() successfully that now cannot function when run in the same directory. I'm uninterested in testing every version that's come out in the last few years to find out which it was.

Workarounds:
Run the game from any directory that doesn't contain applicable special characters. -which is pretty annoying for people who foolishly made a user account containing an é.
Lummox JR resolved issue with message:
flist() failed in Windows on directories with trans-ASCII characters in their names.