Description: I'm calling "FSO.GetBaseName(file)" after getting a list of files in a directory using "filesList = FSO.Files" and "For Each file In filesList". When it gets to a file with a comma in the filename, it throws an error and exits the code. Steps to Reproduce: In LibreOffice BASIC: 1. First, create a file with a comma (",") in the filename in directory "DirName" 2. filesList = fs.Files(DirName, "*.*", IncludeSubfolders := False) 3. For Each file In filesList 4. TempName = fs.GetBaseName(file) 5. Next file Actual Results: LibreOffice BASIC will throw an error and exit the sub Expected Results: This shouldn't throw an error. Commas are allowed in Windows filenames. Reproducible: Always User Profile Reset: No Additional Info: Tracked it down to a "Const" in the header of the SF_String module. I don't anything about Regular Expressions, but I imagine the comma needs to be removed from: Const REGEXFILEWIN="^([A-Z]|[a-z]:)?[^<>:;,?""*|]+$" making it: Const REGEXFILEWIN="^([A-Z]|[a-z]:)?[^<>:;?""*|]+$" BTW: I'm new to LibreOffice. I'm also NOT a programmer (just insanely curious about things), but I do use VBA once in a while. I would also like to write back filenames with commas, so is there any way I can fix this myself, instead of waiting for some future release? I mean, I can see the problem, but I don't know how to access it to fix it!
its simple enough with pure python instead BASIC & SF! ``` from pathlib import Path def test_filelist(*_): directory = Path.home() / "Documents" #for example for p in directory.glob("*.*"): print(p.name) ```