fix: open folders on right correctly

feature/dragDropToFolderConfirm
zanllp 2026-02-01 13:45:07 +08:00
parent d3ded68ea0
commit 5f5f40cb12
1 changed files with 6 additions and 2 deletions

View File

@ -286,12 +286,16 @@ export function useFileItemActions (
tab = { panes: [], key: '', id: uniqueId() }
global.tabList[props.value.tabIdx + 1] = tab
}
const targetPath = file.type === 'dir'
? file.fullpath
: Path.getParentDirectory(file.fullpath)
const pane: FileTransferTabPane = {
type: 'local',
key: uniqueId(),
path: file.fullpath,
path: targetPath,
name: t('local'),
stackKey: path
stackKey: path,
mode: props.value.mode ?? 'scanned'
}
tab.panes.push(pane)
tab.key = pane.key