zwimer/smllr

DirWalker doesn't properly resolve symlinks that use relative paths

Opened this issue · 0 comments

When smllr encounters a symbolic containing a relative path, it evaluates the absolute path as if the symlink were in env::current_dir(). Instead it should evaluate the path from the location of the link.

Steps to reproduce:

  1. dd if=/dev/urandom of=foo bs=4K count=1
  2. mkdir bar
  3. cd bar
  4. ln -s ../foo foo_symlink
  5. cd ..
  6. RUST_LOG=warn ./smllr .

WARN:smllr::walker: Couldn't get metadata for "../gettysburg_addr": No such file or directory (os error 2)