To keep files organized I sometimes name my files with an initial number like 01_something.FCstd, 02_something_else.FCstd, 03_third.FCstd, etc.

However, when I open such file in FreeCAD the file name is changed to _1_something.FCstd, that is, the initial zero is replaced by an underscore.

This name is visible in the search view, and also in the Python console. Everything works as usual, the file works normally, when you save the file, the file is saved to the original name (with an initial zero); it just so happens that the string is shown as starting with an underscore inside FreeCAD.

For example, this is a file called 03_turbulent.FCstd. The operations recorded in the Python console give the impression that I'm using a file named _3_turbulent.FCstd.

This is a very benign bug, but I find it strange. My initial thought was that FreeCAD changes a file name starting with zero (0) to avoid interpreting it for an octal number or something like that. I wonder what code handles processing of the file name.

As we know, every object inside FreeCAD is an object under the document's name. So maybe the code that initially creates the ActiveDocument object parses the name of the file, assigns the Name attribute, and then uses this attribute everywhere in the code. I think for the graphical user interface, the original string of the file name should be used.