mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Max file name length is actually 253 + null term
More than that and fatfs will truncate like name~1 Also dir_read already accounts for null term in buf size, dont malloc +1
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
|
||||
#define TAG "libmgr"
|
||||
|
||||
#define MAX_NAME_LEN 254
|
||||
|
||||
ARRAY_DEF(FlipperApplicationList, FlipperApplication*, M_PTR_OPLIST)
|
||||
#define M_OPL_FlipperApplicationList_t() ARRAY_OPLIST(FlipperApplicationList, M_PTR_OPLIST)
|
||||
|
||||
@@ -103,7 +105,7 @@ PluginManagerError plugin_manager_load_single(PluginManager* manager, const char
|
||||
|
||||
PluginManagerError plugin_manager_load_all(PluginManager* manager, const char* path) {
|
||||
File* directory = storage_file_alloc(manager->storage);
|
||||
char file_name_buffer[256];
|
||||
char file_name_buffer[MAX_NAME_LEN];
|
||||
FuriString* file_name = furi_string_alloc();
|
||||
do {
|
||||
if(!storage_dir_open(directory, path)) {
|
||||
|
||||
Reference in New Issue
Block a user