Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
file-glob always returns an empty list
#6
(08-10-2025, 07:40 PM)pyjamaslug Wrote: OK, in the spirit of answering my own questions:

Looks like there is only one problem and its all to do with windows vs unix path names. (I confused the issue above by having two folder trees with the same names so disregard the comment about relative paths - it isn't doing that)

in addition to not liking backslashes, file-glob doesn't like C: and it doesn't like spaces in folder names whereas regular file load and save are both comfortable with them. WIndows loves spaces - especially if you give your full name as a user and it creates your home directory with a space in it!
All of this means you can't just grab USERPROFILE and go from there. Also, it's going to be hard to grab files from a data drive.
Moving all my files to a unix-friendly location has solved the problem for now.
I still seem to remember reading that the file count is meant to be in the head, so I don't know what's going on there.

To be accurate: Unix path names accept all characters, including spaces, which have been allowed in Unix filesystems since the beginning, well before windows existed. The only restriction is "/" (which is a separator) and the null byte, used internally at the end-of-string delimiter(*). This doesn't mean that care shouldn't be exercised when handling spaces because some code layers (notably the command line argument parsing for instance) may interpret "bare" spaces as token separators.

(*) Windows still forbids all control characters (characters with ASCII code < 32) as well as <>:"/\?*
Reply


Messages In This Thread
RE: file-glob always returns an empty list - by Ofnuts - 08-11-2025, 08:18 AM

Forum Jump: