Skip to content

Commit

Permalink
fixed get_metadata_ext() for Windows implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ph0llux committed Jan 29, 2024
1 parent a80176e commit e39152d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ fn get_metadata_ext<P: AsRef<Path>>(path: P) -> Result<HashMap<String, MetadataE
}

#[cfg(target_os = "windows")]
fn get_metadata_ext<P: AsRef<Path>>(path: P) -> Result<HashMap<String, String>> {
fn get_metadata_ext<P: AsRef<Path>>(path: P) -> Result<HashMap<String, MetadataExtendedValue>> {
let metadata = std::fs::symlink_metadata(path.as_ref())?;

let mut metadata_ext = HashMap::new();

//dwFileAttributes
metadata_ext.insert(METADATA_EXT_DW_FILE_ATTRIBUTES.into(), metadata.file_attributes().to_string());
metadata_ext.insert(METADATA_EXT_DW_FILE_ATTRIBUTES.into(), metadata.file_attributes().into());

Ok(metadata_ext)
}
Expand Down

0 comments on commit e39152d

Please sign in to comment.