Skip to content

When having long filenames enabled via M20 L send the short one when hitting the play button - #457

Open
tuxBurner wants to merge 1 commit into
luc-github:3.1from
tuxBurner:3.1
Open

When having long filenames enabled via M20 L send the short one when hitting the play button#457
tuxBurner wants to merge 1 commit into
luc-github:3.1from
tuxBurner:3.1

Conversation

@tuxBurner

Copy link
Copy Markdown

When i enabled getting the files from the sd with the command: M21;M20 L, I nicely see the long file names of my files on the sd card.

But when i hit the play button, on a long named file, MARLIN complains that it cannot find the file.

This adds the feature having the files listed nicely and send MARLIN the short one.

@luc-github

luc-github commented Jul 30, 2026

Copy link
Copy Markdown
Owner

this is a bug in Marlin - no ?
why not just invert name: path|| pathAlt , in that case ? instead of introducing a new variable

also does this solution affect the normal M20 ?

@tuxBurner

Copy link
Copy Markdown
Author

Well i am not sure if this is a Marlin bug.
My printer is running on the latest commit in the bugfix-2.1.x branch. To have the "M20 L" supported i activated #define LONG_FILENAME_HOST_SUPPORT in the Configuration_adv.h file.

I added the playName var so the name is be used to display the long filename in the ui and sends the short name to the printer when hitting the play button.

I tested also if M20 is still working and it did for me.

@luc-github

Copy link
Copy Markdown
Owner

if long name is not working when sending command then it is marlin bug no ? it was working before

@tuxBurner

Copy link
Copy Markdown
Author

Hmmm okay.

I will check if i missed something in the marlin cfg. I thought that the long names are for only better user experience and that the print gcode needs the short ones.

@luc-github

Copy link
Copy Markdown
Owner

did you check what name is sent compare to what is on sd ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants