mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-11 06:09:08 -07:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user