Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path.Type returns file for directory on OSX 10.11.6 #2

Open
wpuricz opened this issue Feb 22, 2017 · 1 comment
Open

Path.Type returns file for directory on OSX 10.11.6 #2

wpuricz opened this issue Feb 22, 2017 · 1 comment

Comments

@wpuricz
Copy link

wpuricz commented Feb 22, 2017

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!

@yhawaii
Copy link
Contributor

yhawaii commented Jun 21, 2017

Please read this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants