Path.Type returns file for directory on OSX 10.11.6
wpuricz opened this issue · comments
Will Puricz commented
Directory.contents is failing when passed a directory. This is happening because Path.Type returns .file when actually it should be returning .directory. I was able to fix it by adding || 16872 == st_mode to the end of the isDirectory property in the Constants.swift file.
fileprivate var isDirectory: Bool {
return S_IFDIR == st_mode || 16877 == st_mode || 16893 == st_mode || 16872 == st_mode
}
I did not test this on linux.
By the way, awesome library!