jetwhiz / encfs4win

Windows port of EncFS
https://encfs.win
Other
400 stars 41 forks source link

Update ::stat function #103

Closed benrubson closed 5 years ago

benrubson commented 6 years ago

Hi,

This PR tries to correct #98.

First, it modifies stat function based on a solution found here : https://bugs.ruby-lang.org/issues/6845 Some files can't be stated by CreateFileW / GetFileInformationByHandle, so then we try with FindFirstFileW which succeeds.

Then, reparse points / links are ignored in readdir function. A test was attempted to add S_IFLNK to them in stat function but unfortunately Cygwin does not detect such items correctly as links, the solution is then not complete yet. This is then a workaround.

Ben

jetwhiz commented 5 years ago

Thanks @benrubson, this looks good! This fixes https://github.com/jetwhiz/encfs4win/issues/98 for reverse mode.