Fall back to permanently delete on remote shares, part of #909

This commit is contained in:
Jeremy Soller 2025-05-15 11:30:35 -06:00
parent 3b34ba8907
commit a34f727913
No known key found for this signature in database
GPG key ID: 670FDFB5428E05CA
2 changed files with 45 additions and 9 deletions

View file

@ -532,7 +532,7 @@ pub enum FsKind {
}
#[cfg(target_os = "linux")]
fn fs_kind(metadata: &Metadata) -> FsKind {
pub fn fs_kind(metadata: &Metadata) -> FsKind {
//TODO: method to reload remote filesystems dynamically
//TODO: fix for https://github.com/eminence/procfs/issues/262
static DEVICES: Lazy<HashMap<u64, FsKind>> = Lazy::new(|| {
@ -579,7 +579,7 @@ fn fs_kind(metadata: &Metadata) -> FsKind {
}
#[cfg(not(target_os = "linux"))]
fn fs_kind(_metadata: &Metadata) -> FsKind {
pub fn fs_kind(_metadata: &Metadata) -> FsKind {
//TODO: support BSD, macOS, Windows?
FsKind::Local
}