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
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:
parent
99f46a2163
commit
e9b504c733
@ -389,7 +389,10 @@ fn extract_osc7_cwd(data: &[u8]) -> Option<String> {
|
||||
None
|
||||
} else {
|
||||
// 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) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -93,8 +93,8 @@ export function useSftp(sessionIdRef: Ref<string>): UseSftpReturn {
|
||||
|
||||
currentSessionId = sessionId;
|
||||
|
||||
// Restore saved path or default to /home
|
||||
const savedPath = sessionPaths[sessionId] || "/home";
|
||||
// Restore saved path or default to root
|
||||
const savedPath = sessionPaths[sessionId] || "/";
|
||||
currentPath.value = savedPath;
|
||||
|
||||
// Load the directory
|
||||
|
||||
Loading…
Reference in New Issue
Block a user