Files
disktree/crates/disktree-core/src/lib.rs
T
Harold Hunt 329e87293f ssh: treat remote paths as POSIX paths on every client
SSH hosts are Unix: the remote command, the embedded scanners and the
delete script are POSIX shell and Linux tools. But remote paths were
joined, split and compared with std::path, which follows the client. On
a Windows client that joined /home/x and child into /home/x\child, so
marks, the trail and the exported delete script named files that do not
exist on the host, and a Unix name containing \ or : failed the whole
scan.

PathStyle (core) holds both rules: Native is std::path for local scans,
Posix is /-separated for SSH hosts. path_of, mark lookup and display,
crumbs, the trail, mark containment and the progress line now go through
it. On Unix clients the two agree, so nothing changes there.

Marks are keyed by exact path text, since PathBuf equality on Windows
treats \ as a separator. The client refuses a Windows host by name, and
checks the header's home and disk root as well as its root. The SSH CLI
refuses a root that is not /-rooted. The round-trip tests that run the
helper locally are Unix-only, since the local machine is the host; new
hand-built streams and a window test cover a Unix host on every client.
2026-10-23 22:04:02 -04:00

35 lines
779 B
Rust

//! `disktree-core`: scanning, layout, space accounting and deletion, with no
//! UI dependency.
//!
//! The split exists so the parts that must be *correct* — size accounting,
//! hardlink de-duplication, aspect-ratio layout, and what may be deleted — can
//! be built and tested without GPUI, a display, or a GPU.
pub mod access;
pub mod classify;
pub mod deployment;
pub mod export;
pub mod filter;
pub mod identity;
pub mod insights;
#[cfg(target_os = "macos")]
mod macos;
#[cfg(windows)]
mod mft;
pub mod path_style;
pub mod payload;
pub mod remote;
pub mod remote_progress;
#[cfg(unix)]
mod remote_walk;
pub mod removal;
pub mod scan;
pub mod scan_preview;
pub mod scan_threads;
pub mod size;
pub mod space;
pub mod tree;
pub mod treemap;
#[cfg(windows)]
mod windows;