refac
This commit is contained in:
1 parent
d7d935275a
commit
1b3b9375bb
3 files changed
+41
-38
No files matched your search
@@ -1173,21 +1173,21 @@
|
||||
return;
|
||||
}
|
||||
|
||||
const lastSlash = filePath.lastIndexOf('/');
|
||||
const dir = lastSlash > 0 ? filePath.substring(0, lastSlash + 1) : '/';
|
||||
invalidateTreeCache(dir);
|
||||
const lastSlash = filePath.lastIndexOf('/');
|
||||
const dir = lastSlash > 0 ? filePath.substring(0, lastSlash + 1) : '/';
|
||||
invalidateTreeCache(dir);
|
||||
|
||||
if (selectedFile) {
|
||||
if (selectedFile === filePath || currentPath.startsWith(dir)) {
|
||||
const fileName = selectedFile.split('/').pop() ?? '';
|
||||
await openEntry({ name: fileName, type: 'file', size: 0 });
|
||||
if (selectedFile) {
|
||||
if (selectedFile === filePath || currentPath.startsWith(dir)) {
|
||||
const fileName = selectedFile.split('/').pop() ?? '';
|
||||
await openEntry({ name: fileName, type: 'file', size: 0 });
|
||||
}
|
||||
} else {
|
||||
if (currentPath.startsWith(dir) || dir.startsWith(currentPath)) {
|
||||
await refreshBrowser();
|
||||
}
|
||||
} else {
|
||||
if (currentPath.startsWith(dir) || dir.startsWith(currentPath)) {
|
||||
await refreshBrowser();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (!handledDisplayFile && terminal) {
|
||||
loading = true;
|
||||
|
||||
Reference in new issue
Block a user