fix: fix VFS Delete op for Ramdisk driver

This commit is contained in:
daniel committed 2026-05-27 18:06:27 +02:00
1 parent 9217c84492
commit ecf1b70e8f
2 files changed
+38 -21

No files matched your search

@@ -108,14 +108,15 @@ void filemanager_finish_rename(FileManagerState* fm) {
filemanager_build_fullpath(new_path, 512,
fm->current_path, fm->rename_buf);
if (fm->is_dir[fm->rename_idx]) {
// Directory rename: copy recursively then delete old
if (filemanager_copy_dir_recursive(old_path, new_path))
filemanager_delete_recursive(old_path);
} else {
// File rename: copy then delete old
if (filemanager_copy_file(old_path, new_path))
montauk::fdelete(old_path);
if (montauk::frename(old_path, new_path) != 0) {
// Fall back to copy + delete for drivers that don't support rename
if (fm->is_dir[fm->rename_idx]) {
if (filemanager_copy_dir_recursive(old_path, new_path))
filemanager_delete_recursive(old_path);
} else {
if (filemanager_copy_file(old_path, new_path))
montauk::fdelete(old_path);
}
}
filemanager_read_dir(fm);