janet icon indicating copy to clipboard operation
janet copied to clipboard

os/stat on windows doesn't detect junctions?

Open yumaikas opened this issue 4 years ago • 0 comments

So, for writing anno, I've been writing recursive file searching of a couple types, and one thing I've noticed is that os/stat doesn't detect junctions, which are the windows version of softlinks.

They are implemented using something called Reparse points.

The easiest reproduction I can find is as follows;

cd %USERPROFILE%\Documents
dir /AL
janet -e "(os/stat "My Videos")"

dir /AL reports My Videos as a Junction, janet's os/stat reports it as a directory. Calling (os/dir "My Videos") complains of an invalid parameter

I think it should report either as :link or :other? Or there should be some means of detecting them.

yumaikas avatar Jan 10 '21 08:01 yumaikas