Fix copy/paste and rename behaviors

Same beginning of name != same file/folder
Must check with a / suffixed

And never hold a pointer to furi string cstr
This commit is contained in:
Willy-JL
2023-11-25 18:10:05 +00:00
parent 66bb02e9db
commit 750f371182
2 changed files with 24 additions and 14 deletions

View File

@@ -757,6 +757,10 @@ void storage_process_message_internal(Storage* app, StorageMessage* message) {
storage_path_trim_trailing_slashes(path2);
storage_process_alias(app, path1, message->data->cequivpath.thread_id, false);
storage_process_alias(app, path2, message->data->cequivpath.thread_id, false);
// Comparison is done on path name, same beginning of name != same file/folder
// Check with a / suffixed to ensure same file/folder name
furi_string_cat(path1, "/");
furi_string_cat(path2, "/");
if(message->data->cequivpath.truncate) {
furi_string_left(path2, furi_string_size(path1));
}