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

Root subfolder parent is not root #74

Closed
MaximeLM opened this issue Nov 30, 2018 · 0 comments · Fixed by #75
Closed

Root subfolder parent is not root #74

MaximeLM opened this issue Nov 30, 2018 · 0 comments · Fixed by #75

Comments

@MaximeLM
Copy link
Contributor

Hello,

let rootFolder = try Folder(path: "/")
let subfolder = rootFolder.subfolders.first
print(subfolder?.parent?.path)

Expected result: Optional("/")
Actual result: current working directory

Because of this bug, iterating over a folder parents triggers an inifinite loop.

I will submit a pull request with the fix.

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

Successfully merging a pull request may close this issue.

1 participant