fix: SFTP browser — default to / instead of /home, strip quotes from CWD
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 3m0s

/home doesn't exist on macOS (home dirs are /Users/). Changed default
SFTP path to / so it always loads. OSC 7 parser now strips stray
quotes from shell printf output that produced paths like /"/path".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell 2026-03-25 01:29:38 -04:00
parent 99f46a2163
commit e9b504c733
2 changed files with 6 additions and 3 deletions

View File

@ -389,7 +389,10 @@ fn extract_osc7_cwd(data: &[u8]) -> Option<String> {
None None
} else { } else {
// URL-decode the path (spaces encoded as %20, etc.) // URL-decode the path (spaces encoded as %20, etc.)
Some(percent_decode(path)) // Strip any stray quotes from shell printf output
let decoded = percent_decode(path);
let clean = decoded.trim_matches('"').trim_matches('\'').to_string();
if clean.is_empty() { None } else { Some(clean) }
} }
} }

View File

@ -93,8 +93,8 @@ export function useSftp(sessionIdRef: Ref<string>): UseSftpReturn {
currentSessionId = sessionId; currentSessionId = sessionId;
// Restore saved path or default to /home // Restore saved path or default to root
const savedPath = sessionPaths[sessionId] || "/home"; const savedPath = sessionPaths[sessionId] || "/";
currentPath.value = savedPath; currentPath.value = savedPath;
// Load the directory // Load the directory