Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#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)

0001-Fix-posix-file-type-on-Windows-by-testing-for-regula.patch (748 bytes) - added by Jim Ursetto 13 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 13 years ago by felix winkelmann

Resolution: fixed
Status: newclosed

Thanks very much, patch applied.

comment:2 Changed 12 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.