file manager move file to parent folder fix

This commit is contained in:
nakst 2021-10-23 17:29:33 +01:00
parent 116fad6273
commit e0072ec83b
1 changed files with 0 additions and 10 deletions

View File

@ -504,21 +504,11 @@ void FolderPathMoved(String oldPath, String newPath, bool saveConfiguration) {
for (uintptr_t j = 0; j < instances[i]->pathBackwardHistory.Length(); j++) {
HistoryEntry *entry = &instances[i]->pathBackwardHistory[j];
PathReplacePrefix(&entry->path, oldPath, newPath);
if (StringStartsWith(oldPath, entry->path) && StringEquals(entry->focusedItem, StringSlice(oldPath, entry->path.bytes, -1))) {
StringDestroy(&entry->focusedItem);
entry->focusedItem = StringDuplicate(StringSlice(newPath, entry->path.bytes, -1));
}
}
for (uintptr_t j = 0; j < instances[i]->pathForwardHistory.Length(); j++) {
HistoryEntry *entry = &instances[i]->pathForwardHistory[j];
PathReplacePrefix(&entry->path, oldPath, newPath);
if (StringStartsWith(oldPath, entry->path) && StringEquals(entry->focusedItem, StringSlice(oldPath, entry->path.bytes, -1))) {
StringDestroy(&entry->focusedItem);
entry->focusedItem = StringDuplicate(StringSlice(newPath, entry->path.bytes, -1));
}
}
}