-
-
Notifications
You must be signed in to change notification settings - Fork 19
Description
When the connector generates display_connector.cfg for the first time, it writes clean_filename_regex = .*_(.*?_(?:[0-9]+h|[0-9]+m|[0-9]+s)+\.gcode) into [general]. Because display.py always loads that regex if present, the built-in formatter is overridden immediately—even for users who never touched the config. As a result, the file browser displays the tail of each filename (e.g. _Elegoo Neptune 4 Pro_1h12m.gcode) instead of the intuitive prefix, while other screens (which use a different context) still look correct. Commenting out or deleting the generated line fixes the issue.
Proposed fix
During src/config.py initialization, don’t populate clean_filename_regex with an active value. Instead, write only commented guidance:
; clean_filename_regex = …
That keeps the default trimming logic in src/mapping.py active until a user intentionally overrides it, restoring consistent filenames in the file list out of the box while preserving configurability.