Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long filename file create/write #23526

Merged
merged 17 commits into from
Jan 18, 2022
Merged
Prev Previous commit
Next Next commit
Fix SFN generation
GHGiampy committed Jan 17, 2022
commit 671b574c9056be8850530cc790251d7aea3a9b7e
4 changes: 2 additions & 2 deletions Marlin/src/sd/SdBaseFile.cpp
Original file line number Diff line number Diff line change
@@ -1113,8 +1113,8 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) {
// Check minimal length
if (iFree < 3) {
// Append 4 extra characters
name[iFree++] = random(0,24) + 'A'; name[iFree++] = random(1,9) + 'A';
name[iFree++] = random(0,24) + 'A'; name[iFree++] = random(1,9) + 'A';
name[iFree++] = random(0,24) + 'A'; name[iFree++] = random(0,24) + 'A';
name[iFree++] = random(0,24) + 'A'; name[iFree++] = random(0,24) + 'A';
}
// Append '~cnt' characters
if (iFree > 5) iFree = 5; // Force the append in the last 3 characters of name part