Select sl/iLib_symlink and choose from the menu File/(Un)Compress. The symlink icon of sl/iLib_symlink is shown properly contrary to the original.
Comments on the code
There are two locations in the source where the attributes are fetched directly via GetFileAttributes() and thus bypass WFFind{First|Next} extended in #297
treectl.c/InsertDirectory()
wffile.c/RedrawAllTreeWindows()
The topic 1. was handled in #308 as a byproduct, but 2. is addressed in this PR.
Anyhow, the fix is simple and introduces a helper function SetNodeAttribs(), which is called from 1) and 2)
Glad you found this. It is one of the perils of working on an old code base with some redundancy "built" in -- e.g. #define ATTR_DIR FILE_ATTRIBUTE_DIRECTORY.
Problem
In the aftermath of #308 I stumbled about one detail we missed: After (un)compress on a symbolic link the symlink icon is not shown anymore.
How to test
Download ln.exe from https://schinagl.priv.at/nt/ln/ln64.zip and place it in the same directory as the below .bat file. Start TestCopyReparsePoint.bat from an administrative command prompt in your e.g. temp directory.
It builds a structure like
Select sl/iLib_symlink and choose from the menu File/(Un)Compress. The symlink icon of sl/iLib_symlink is shown properly contrary to the original.
Comments on the code
There are two locations in the source where the attributes are fetched directly via GetFileAttributes() and thus bypass WFFind{First|Next} extended in #297
The topic 1. was handled in #308 as a byproduct, but 2. is addressed in this PR. Anyhow, the fix is simple and introduces a helper function SetNodeAttribs(), which is called from 1) and 2)