Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions subsys/settings/src/settings_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,18 +539,23 @@
if (i > 0 && file_path[i] == '/') {
dir_path[i] = '\0';

err = mkdir_if_not_exists(dir_path);
if (err) {
return err;
/* Skip mkdir for FatFS root directories (ending with ':') */
if (strrchr(dir_path, ':') == &dir_path[strlen(dir_path) - 1]) {
LOG_DBG("FatFS root directory detected, skipping mkdir for path: ""%s", dir_path);

Check warning on line 544 in subsys/settings/src/settings_file.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LONG_LINE

subsys/settings/src/settings_file.c:544 line length of 114 exceeds 100 columns

Check warning on line 544 in subsys/settings/src/settings_file.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

STRING_FRAGMENTS

subsys/settings/src/settings_file.c:544 Consecutive strings are generally better as a single string
} else {
err = mkdir_if_not_exists(dir_path);
if (err) {
return err;
}
}
}

dir_path[i] = file_path[i];
}

return 0;
}


int settings_backend_init(void)
{
static struct settings_file config_init_settings_file = {
Expand Down
Loading