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() } tab = { panes: [], key: '', id: uniqueId() }
global.tabList[props.value.tabIdx + 1] = tab global.tabList[props.value.tabIdx + 1] = tab
} }
const targetPath = file.type === 'dir'
? file.fullpath
: Path.getParentDirectory(file.fullpath)
const pane: FileTransferTabPane = { const pane: FileTransferTabPane = {
type: 'local', type: 'local',
key: uniqueId(), key: uniqueId(),
path: file.fullpath, path: targetPath,
name: t('local'), name: t('local'),
stackKey: path stackKey: path,
mode: props.value.mode ?? 'scanned'
} }
tab.panes.push(pane) tab.panes.push(pane)
tab.key = pane.key tab.key = pane.key