Skip to content

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

Open
@wpuricz

Description

@wpuricz

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions