about summary refs log tree commit diff
path: root/tvix/eval/src/io.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/io.rs')
-rw-r--r--tvix/eval/src/io.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/io.rs b/tvix/eval/src/io.rs
index e4bad7b11ce0..7e8b85c87abb 100644
--- a/tvix/eval/src/io.rs
+++ b/tvix/eval/src/io.rs
@@ -26,7 +26,7 @@ use std::os::unix::ffi::OsStringExt;
 #[cfg(feature = "impure")]
 use std::fs::File;
 
-/// Types of files as represented by `builtins.readDir` in Nix.
+/// Types of files as represented by `builtins.readFileType` and `builtins.readDir` in Nix.
 #[derive(Debug)]
 pub enum FileType {
     Directory,
@@ -120,7 +120,7 @@ impl EvalIO for StdIO {
     }
 
     fn file_type(&self, path: &Path) -> io::Result<FileType> {
-        let file_type = File::open(path)?.metadata()?.file_type();
+        let file_type = std::fs::symlink_metadata(path)?;
 
         Ok(if file_type.is_dir() {
             FileType::Directory