Skip to content

Made filesearch aware of symbolic links

Sparkette requested to merge flarn2006/SRB2:custom-2.2.10 into next

I just realized I probably should have based this from the "next" branch, but it looks like it merges cleanly so no big deal. Anyway, this is a change I originally made in my personal fork. I wanted to have a folder where I put symlinks to mod files, the idea being that then I don't have to remember the full name when doing addfile, plus if I reference them in multiple cfg files, I can simply update the symlinks to point to the latest version without having to update any of the cfg files. However, I noticed a problem with this approach: the files would be added to the WAD list under the name of the symbolic link, rather than the actual name of the file. This means people would have to redownload files they might already have, just because they don't have it under that name. Plus, if I add one while hosting a server, it makes it more likely that people will be kicked.

To solve this problem, I modified filesearch to check whether a file is a symbolic link. If it is, it will return the path to the link's target (with the canonical name of the mod) instead of the link itself.

Merge request reports