mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-23 08:31:49 +00:00
fix(sftp): sync reconnect host on tab reuse and home-fallback stale paths
Update lastConnectedHost when auto-connect reselects an existing tab, and always try the detected home directory when a remembered start path fails.
This commit is contained in:
1 parent
7538dd0b9f
commit
8a95fa1eda
3 files changed
+17
-1
No files matched your search
@@ -351,6 +351,9 @@ const SftpSidePanelInner: React.FC<SftpSidePanelProps> = ({
|
||||
);
|
||||
if (existingTab) {
|
||||
s.selectTab("left", existingTab.id);
|
||||
// selectTab does not update reconnect metadata; keep lastConnectedHost
|
||||
// aligned with the tab we just activated so channel drops rebind correctly.
|
||||
s.setLastConnectedHost?.("left", activeHost);
|
||||
connectedKeyRef.current = connectionKey;
|
||||
connectedHostObjRef.current = activeHost;
|
||||
// Session memory keys are per terminal session; republish the visible
|
||||
|
||||
Reference in new issue
Block a user