fix (rename): issue with renaming folder

This commit is contained in:
MickaelK 2025-08-19 00:26:43 +10:00
parent fe324601d1
commit aea5150e43

View file

@ -150,10 +150,11 @@ function componentLeft(render, { $scroll, getSelectionLength$ }) {
basename(path.replace(new RegExp("/$"), "")), basename(path.replace(new RegExp("/$"), "")),
)).pipe(rxjs.mergeMap((val) => { )).pipe(rxjs.mergeMap((val) => {
const [basepath] = extractPath(path); const [basepath] = extractPath(path);
const newpath = basepath + val + (path.slice(-1) === "/" ? "/" : "");
clearSelection(); clearSelection();
clearCache(path); clearCache(path);
clearCache(basepath + val); clearCache(newpath);
return mv(path, basepath + val); return mv(path, newpath);
})); }));
})), })),
onClick(qs($page, `[data-action="delete"]`)).pipe(rxjs.mergeMap(() => { onClick(qs($page, `[data-action="delete"]`)).pipe(rxjs.mergeMap(() => {