Skip to content

File list shows truncated endings of G-code names by default #42

@v-2841

Description

@v-2841

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions