Skip to content

Commit b2ba12c

Browse files
committed
storage: check for success on storage_common_remove in file rename
1 parent 55cfbf4 commit b2ba12c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

applications/services/storage/storage_external_api.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,10 @@ FS_Error storage_common_rename(Storage* storage, const char* old_path, const cha
425425
FS_Error error;
426426

427427
if(storage_file_exists(storage, new_path)) {
428-
storage_common_remove(storage, new_path);
428+
error = storage_common_remove(storage, new_path);
429+
if(error != FSE_OK) {
430+
return error;
431+
}
429432
}
430433

431434
error = storage_common_copy(storage, old_path, new_path);

0 commit comments

Comments
 (0)