Skip to content

Commit

Permalink
fixed metadata attribute keys missing in macos workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ph0llux committed Nov 28, 2023
1 parent 4791643 commit 89f56ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/lib/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ pub const DEFAULT_CHUNKMAP_SIZE: u64 = 32768;


// file metadata extended values
#[cfg(target_os = "linux")]
#[cfg(target_family = "unix")]
pub(crate) const METADATA_EXT_KEY_DEVID: &str = "devid";
#[cfg(target_os = "linux")]
#[cfg(target_family = "unix")]
pub(crate) const METADATA_EXT_KEY_INODE: &str = "inode";
#[cfg(target_os = "linux")]
#[cfg(target_family = "unix")]
pub(crate) const METADATA_EXT_KEY_MODE: &str = "mode";
#[cfg(target_os = "linux")]
#[cfg(target_family = "unix")]
pub(crate) const METADATA_EXT_KEY_UID: &str = "uid";
#[cfg(target_os = "linux")]
#[cfg(target_family = "unix")]
pub(crate) const METADATA_EXT_KEY_GID: &str = "gid";
#[cfg(target_os = "windows")]
pub(crate) const METADATA_EXT_DW_FILE_ATTRIBUTES: &str = "dwFileAttributes";
Expand Down
6 changes: 3 additions & 3 deletions src/lib/io/zffreader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,15 +566,15 @@ fn extract_recommended_metadata(fileheader: &FileHeader) -> HashMap<String, Stri
metadata.insert(METADATA_BTIME.to_string(), value.to_string());
}

#[cfg(target_os = "linux")]
#[cfg(target_family = "unix")]
if let Some(value) = fileheader.metadata_ext.get(METADATA_EXT_KEY_UID) {
metadata.insert(METADATA_EXT_KEY_UID.to_string(), value.to_string());
}
#[cfg(target_os = "linux")]
#[cfg(target_family = "unix")]
if let Some(value) = fileheader.metadata_ext.get(METADATA_EXT_KEY_GID) {
metadata.insert(METADATA_EXT_KEY_GID.to_string(), value.to_string());
}
#[cfg(target_os = "linux")]
#[cfg(target_family = "unix")]
if let Some(value) = fileheader.metadata_ext.get(METADATA_EXT_KEY_MODE) {
metadata.insert(METADATA_EXT_KEY_MODE.to_string(), value.to_string());
}
Expand Down

0 comments on commit 89f56ef

Please sign in to comment.