Summary

file-type does not work on Windows

Metadata

Attachments

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.

Changes and comments

[2011-06-15 08:02:17 UTC] zbigniew attached 0001-Fix-posix-file-type-on-Windows-by-testing-for-regula.patch (description=#f)

[2011-06-18 13:18:56 UTC] felix changed status from new to closed

[2011-06-18 13:18:56 UTC] felix set resolution to fixed

[2011-06-18 13:18:56 UTC] felix wrote:

Thanks very much, patch applied.

[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0

[2012-09-24 21:47:48 UTC] felix wrote:

Milestone 4.8.0 deleted