#32 q3maps.c:traverse_dir() doesn't handle symlinks properly

closed-wont-fix
nobody
None
5
2007-01-06
2007-01-06
Anonymous
No

The traverse_dir() call uses lstat when it should be using stat() for the target instead of the link itself.

If you change it to stat, it will handle 1 symlink to a real directory. The traverse_dir should also account for symlinks to symlinks and so on.

Additionally, there are some valid maps that are inserted and then deleted. I think this is due to using the hashtable to check for maps. Somewhere along the way, it will insert the map (insert_shot) and then remove it multiple times (drop shot).

Because of assumed case insensitivity in Windows, I have to use several symlinks so mod names are name and NAME. In addition, I have multiple versions which are more symlinks. This causes problems for xqf because not all screenshots are kept properly.

Discussion

  • Ludwig Nussel
    Ludwig Nussel
    2007-01-06

    • status: open --> closed-wont-fix
     
  • Ludwig Nussel
    Ludwig Nussel
    2007-01-06

    Logged In: YES
    user_id=333900
    Originator: NO

    symlinks to directories are not followed on purpose to avoid complicated loop checks.