#607 closed defect (fixed)
file-type does not work on Windows
Reported by: | Jim Ursetto | Owned by: | felix winkelmann |
---|---|---|---|
Priority: | major | Milestone: | 4.9.0 |
Component: | core libraries | Version: | 4.7.x |
Keywords: | Cc: | ||
Estimated difficulty: |
Description
Because unknown file types like S_IFLNK are defined to S_IFREG on Windows, file-type will always report symbolic-link for regular files (and regular-file? will return #f).
Attached patch tests for S_IFREG first, fixing the problem. FYI, applying with "git am filename.patch" will propagate authorship credit.
Alternative solution: define S_IFLNK etc. to 0. Slightly more dangerous but all platforms should have no zero file type flags. posix-extras currently uses this method.
Attachments (1)
Change History (3)
Changed 14 years ago by
Attachment: | 0001-Fix-posix-file-type-on-Windows-by-testing-for-regula.patch added |
---|
comment:1 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Thanks very much, patch applied.