Improve error handling, use correct drive id

This commit is contained in:
Willy-JL
2024-04-06 23:16:29 +01:00
parent d05080820d
commit 29c3813f68
2 changed files with 16 additions and 8 deletions

View File

@@ -158,7 +158,7 @@ size_t storage_open_files_count(StorageData* storage) {
}
const char* storage_file_get_path(File* file, StorageData* storage) {
if(!storage_has_file(file, storage)) return "";
StorageFile* storage_file_ref = storage_get_file(file, storage);
if(!storage_file_ref) return "";
return furi_string_get_cstr(storage_file_ref->path);
}