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


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.


  • Ludwig Nussel

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

    Ludwig Nussel - 2007-01-06

    Logged In: YES
    Originator: NO

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


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks