about summary refs log tree commit diff
path: root/tvix/castore/src/import/mod.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-04-30T09·16+0300
committerflokli <flokli@flokli.de>2024-04-30T13·18+0000
commit5e8cfcfcd6289cff5c4391fa93e4246ec1cf6c23 (patch)
tree485f789cdc5e9c2405e8166a44e83966e8adfd71 /tvix/castore/src/import/mod.rs
parentca64881cb3fe4a5e30baf0f0b1f457af44bb143a (diff)
fix(tvix/castore/import): symlink targets are Vec<u8> r/8045
These can be arbitrary bytes in theory. Some of our libraries might
be more strict, or inconsistent w.r.t. their representation of path
separators.

Change-Id: I7981b74fc7d3dd79f5589cf2ef52ced7b71dd003
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11551
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
Diffstat (limited to 'tvix/castore/src/import/mod.rs')
-rw-r--r--tvix/castore/src/import/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/castore/src/import/mod.rs b/tvix/castore/src/import/mod.rs
index e9fdc750f8c1..e77eda255fbf 100644
--- a/tvix/castore/src/import/mod.rs
+++ b/tvix/castore/src/import/mod.rs
@@ -114,7 +114,7 @@ where
             }
             IngestionEntry::Symlink { ref target, .. } => Node::Symlink(SymlinkNode {
                 name,
-                target: target.as_os_str().as_bytes().to_owned().into(),
+                target: target.to_owned().into(),
             }),
             IngestionEntry::Regular {
                 size,
@@ -209,7 +209,7 @@ pub enum IngestionEntry {
     },
     Symlink {
         path: PathBuf,
-        target: PathBuf,
+        target: Vec<u8>,
     },
     Dir {
         path: PathBuf,