Skip to content

Fix crashes when creating directories at single component relative paths #1405

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

Merged
merged 1 commit into from
Jan 24, 2018
Merged

Conversation

mattrajca
Copy link
Contributor

Bail early if after calling deletingLastPathComponent the path is empty. There is
no point in doing a traversal and trying to create an empty directory at the parent
path. In addition, this ends up tripping a pre-condition when we try finding the next
parent path component again.

This addresses SR-4570.

Bail early if after calling deletingLastPathComponent the path is empty. There is
no point in doing a traversal and trying to create an empty directory at the parent
path. In addition, this ends up tripping a pre-condition when we try finding the next
parent path component again.

This addresses SR-4570.
@millenomi
Copy link
Contributor

@swift-ci Please test.

Copy link
Contributor

@parkera parkera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@millenomi
Copy link
Contributor

@swift-ci Please test and merge.

@swift-ci swift-ci merged commit 1097fd8 into swiftlang:master Jan 24, 2018
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 this pull request may close these issues.

4 participants