mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-11 19:33:30 -07:00
OFW, why are you ignoring "already exists" errors?
This commit is contained in:
@@ -139,7 +139,7 @@ FS_Error archive_rename_file_or_dir(void* context, const char* src_path, const c
|
||||
archive_favorites_rename(src_path, dst_path);
|
||||
}
|
||||
|
||||
if(error == FSE_OK || error == FSE_EXIST) {
|
||||
if(error == FSE_OK) {
|
||||
FURI_LOG_I(TAG, "Rename from %s to %s is DONE", src_path, dst_path);
|
||||
archive_refresh_dir(browser);
|
||||
} else {
|
||||
|
||||
@@ -92,9 +92,7 @@ bool archive_scene_rename_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
furi_string_free(path_dst);
|
||||
|
||||
if(error == FSE_OK || error == FSE_EXIST) {
|
||||
scene_manager_next_scene(archive->scene_manager, ArchiveAppSceneBrowser);
|
||||
} else {
|
||||
if(error != FSE_OK) {
|
||||
FuriString* dialog_msg;
|
||||
dialog_msg = furi_string_alloc();
|
||||
furi_string_cat_printf(dialog_msg, "Cannot rename\nCode: %d", error);
|
||||
@@ -102,6 +100,7 @@ bool archive_scene_rename_on_event(void* context, SceneManagerEvent event) {
|
||||
archive->dialogs, furi_string_get_cstr(dialog_msg));
|
||||
furi_string_free(dialog_msg);
|
||||
}
|
||||
scene_manager_next_scene(archive->scene_manager, ArchiveAppSceneBrowser);
|
||||
consumed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ bool infrared_rename_current_remote(Infrared* infrared, const char* name) {
|
||||
furi_string_free(new_path);
|
||||
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
return (status == FSE_OK || status == FSE_EXIST);
|
||||
return status == FSE_OK;
|
||||
}
|
||||
|
||||
void infrared_tx_start_signal(Infrared* infrared, InfraredSignal* signal) {
|
||||
|
||||
Reference in New Issue
Block a user