summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 7db1115..3c90156 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -42,7 +42,7 @@ const BUF_SIZE: usize = 1024 * 1024;
/// An entry in a file manifest.
#[derive(Serialize, Debug)]
pub struct ManifestEntry {
- path: PathBuf,
+ path: String,
#[serde(with = "mode")]
mode: u32,
mtime: i64,
@@ -73,7 +73,7 @@ impl ManifestEntry {
None
};
Ok(Self {
- path: path.to_path_buf(),
+ path: path.to_string_lossy().into_owned(),
mode: m.st_mode(),
mtime: m.st_mtime(),
mtime_nsec: m.st_mtime_nsec(),