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

rename #define MAX_FILENAME_LEN #1

Merged
merged 1 commit into from Feb 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/mscFS.h
Expand Up @@ -38,7 +38,7 @@
// Support everything on 32 bit boards with enough memory
#define MSCFAT_FILE FsFile
#define MSCFAT_BASE UsbFs
#define MAX_FILENAME_LEN 256
#define MSC_MAX_FILENAME_LEN 256
#endif

class MSCFile : public File
Expand Down Expand Up @@ -104,9 +104,9 @@ class MSCFile : public File
}
virtual const char * name() {
if (!filename) {
filename = (char *)malloc(MAX_FILENAME_LEN);
filename = (char *)malloc(MSC_MAX_FILENAME_LEN);
if (filename) {
mscfatfile.getName(filename, MAX_FILENAME_LEN);
mscfatfile.getName(filename, MSC_MAX_FILENAME_LEN);
} else {
static char zeroterm = 0;
filename = &zeroterm;
Expand Down Expand Up @@ -179,7 +179,7 @@ extern MSCClass MSC;
// do not expose these defines in Arduino sketches or other libraries
#undef MSCFAT_FILE
#undef MSCFAT_BASE
#undef MAX_FILENAME_LEN
#undef MSC_MAX_FILENAME_LEN

#define SD_CARD_TYPE_USB 4

Expand Down