Fix rename/move API, now rename/rename_safe (#468)

On OFW "rename" acts like "move", it replaces the destination
XFW had an extra "move" like that, and "rename" errored if dest exists
Now for compatibility "rename" acts as OFW, and new "rename_safe" errors
Tweaked all usages to work properly
Decided for CLI and RPC to use "rename_safe" so user cant lose files
This commit is contained in:
Willy-JL
2023-11-28 00:00:40 +00:00
parent c4675afa5e
commit e0fa360640
9 changed files with 47 additions and 47 deletions

View File

@@ -651,7 +651,7 @@ static void rpc_system_storage_rename_process(const PB_Main* request, void* cont
Storage* fs_api = furi_record_open(RECORD_STORAGE);
if(path_contains_only_ascii(request->content.storage_rename_request.new_path)) {
FS_Error error = storage_common_rename(
FS_Error error = storage_common_rename_safe(
fs_api,
request->content.storage_rename_request.old_path,
request->content.storage_rename_request.new_path);