Windows compatibility pass (beta target)
External editor via cmd/start + exe picker; Permissions hidden for Windows-local (chmod only flips read-only there); Explorer/Recycle Bin wording; Ctrl vs Cmd shortcut labels; separator-aware path joins + drive-root detection; drives list in the panel source picker; icon.ico + colored tray icon; icacls ACL on connections.json; README Windows (beta) section with upstream known issues and a smoke-test checklist. Runtime paths pending first boot on a real Windows machine. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,22 @@ function resolveId(kind: "user" | "group", id: number): string | undefined {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Drive roots for the Windows panel source picker ("C:\", "D:\", …).
|
||||
* PORTABILITY: win32-only concept; empty elsewhere ("/" is always reachable).
|
||||
*/
|
||||
export function listLocalDrives(): string[] {
|
||||
if (process.platform !== "win32") return [];
|
||||
try {
|
||||
const proc = Bun.spawnSync(["fsutil", "fsinfo", "drives"], { stdout: "pipe", stderr: "ignore" });
|
||||
if (!proc.success) return [];
|
||||
// output: "Drives: C:\ D:\ ..."
|
||||
return [...proc.stdout.toString().matchAll(/[A-Za-z]:\\/g)].map((m) => m[0]);
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
function toEntry(name: string, full: string, st: Stats): FileEntry {
|
||||
return {
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user