about summary refs log tree commit diff
path: root/tvix/castore/src/import/fs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/castore/src/import/fs.rs')
-rw-r--r--tvix/castore/src/import/fs.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tvix/castore/src/import/fs.rs b/tvix/castore/src/import/fs.rs
index 03a52f2ba073..5e7061bec66d 100644
--- a/tvix/castore/src/import/fs.rs
+++ b/tvix/castore/src/import/fs.rs
@@ -2,6 +2,7 @@
 
 use futures::stream::BoxStream;
 use futures::StreamExt;
+use std::os::unix::ffi::OsStringExt;
 use std::os::unix::fs::MetadataExt;
 use std::os::unix::fs::PermissionsExt;
 use std::path::Path;
@@ -108,7 +109,9 @@ where
         Ok(IngestionEntry::Dir { path })
     } else if file_type.is_symlink() {
         let target = std::fs::read_link(entry.path())
-            .map_err(|e| Error::UnableToStat(entry.path().to_path_buf(), e))?;
+            .map_err(|e| Error::UnableToStat(entry.path().to_path_buf(), e))?
+            .into_os_string()
+            .into_vec();
 
         Ok(IngestionEntry::Symlink { path, target })
     } else if file_type.is_file() {