fix for removing files
This commit is contained in:
parent
0902915c33
commit
9ecc26ce59
1 changed files with 13 additions and 13 deletions
|
@ -504,12 +504,6 @@ void DependencyRemoveDialog::show(const Vector<String> &p_folders, const Vector<
|
|||
|
||||
void DependencyRemoveDialog::ok_pressed() {
|
||||
|
||||
if (dirs_to_delete.size() == 0) {
|
||||
//If we only deleted files we should only need to tell the file system about the files we touched.
|
||||
for (int i = 0; i < files_to_delete.size(); ++i)
|
||||
EditorFileSystem::get_singleton()->update_file(files_to_delete[i]);
|
||||
} else {
|
||||
|
||||
for (int i = 0; i < files_to_delete.size(); ++i) {
|
||||
if (ResourceCache::has(files_to_delete[i])) {
|
||||
Resource *res = ResourceCache::get(files_to_delete[i]);
|
||||
|
@ -523,6 +517,12 @@ void DependencyRemoveDialog::ok_pressed() {
|
|||
}
|
||||
}
|
||||
|
||||
if (dirs_to_delete.size() == 0) {
|
||||
//If we only deleted files we should only need to tell the file system about the files we touched.
|
||||
for (int i = 0; i < files_to_delete.size(); ++i)
|
||||
EditorFileSystem::get_singleton()->update_file(files_to_delete[i]);
|
||||
} else {
|
||||
|
||||
for (int i = 0; i < dirs_to_delete.size(); ++i) {
|
||||
String path = OS::get_singleton()->get_resource_dir() + dirs_to_delete[i].replace_first("res://", "/");
|
||||
print_line("Moving to trash: " + path);
|
||||
|
|
Loading…
Reference in a new issue