Skip to content

Commit 89bb824

Browse files
committed
fix CI formatter check
1 parent ad9f8b6 commit 89bb824

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/web-ui/src/handlers.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,7 @@ pub async fn search_files(
868868

869869
use chrono::{DateTime, Utc};
870870
use std::fs;
871+
#[cfg(unix)]
871872
use std::os::unix::fs::PermissionsExt;
872873
use std::path::Path;
873874

@@ -1001,10 +1002,13 @@ fn collect_entries_single_level(
10011002
});
10021003

10031004
let mut entry_metadata = HashMap::new();
1005+
#[cfg(unix)]
10041006
entry_metadata.insert(
10051007
"permissions".to_string(),
10061008
json!(format!("{:o}", metadata.permissions().mode() & 0o777)),
10071009
);
1010+
#[cfg(not(unix))]
1011+
entry_metadata.insert("permissions".to_string(), json!("N/A"));
10081012

10091013
entries.push(FileSystemEntry {
10101014
path: path.to_string_lossy().to_string(),

0 commit comments

Comments
 (0)