mirror of https://gitlab.com/nakst/essence
file manager move file to parent folder fix
This commit is contained in:
parent
116fad6273
commit
e0072ec83b
|
@ -504,21 +504,11 @@ void FolderPathMoved(String oldPath, String newPath, bool saveConfiguration) {
|
||||||
for (uintptr_t j = 0; j < instances[i]->pathBackwardHistory.Length(); j++) {
|
for (uintptr_t j = 0; j < instances[i]->pathBackwardHistory.Length(); j++) {
|
||||||
HistoryEntry *entry = &instances[i]->pathBackwardHistory[j];
|
HistoryEntry *entry = &instances[i]->pathBackwardHistory[j];
|
||||||
PathReplacePrefix(&entry->path, oldPath, newPath);
|
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++) {
|
for (uintptr_t j = 0; j < instances[i]->pathForwardHistory.Length(); j++) {
|
||||||
HistoryEntry *entry = &instances[i]->pathForwardHistory[j];
|
HistoryEntry *entry = &instances[i]->pathForwardHistory[j];
|
||||||
PathReplacePrefix(&entry->path, oldPath, newPath);
|
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));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue