Skip to content

Emphasise that these functions look at the disk, not just the path #43614

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Aug 2, 2017

Conversation

kornelski
Copy link
Contributor

I thought that PathBuf::new("foo/bar/").is_dir() is always true, because the path ends in /. However, this is not what is_dir() function does. So I've updated the docs to make it clear.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @BurntSushi (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@BurntSushi
Copy link
Member

Seems reasonable to me! @bors r+

@bors
Copy link
Collaborator

bors commented Aug 2, 2017

📌 Commit 4792d28 has been approved by BurntSushi

@kennytm
Copy link
Member

kennytm commented Aug 2, 2017

@bors rollup

@bors
Copy link
Collaborator

bors commented Aug 2, 2017

⌛ Testing commit 4792d28 with merge b75d1f0...

bors added a commit that referenced this pull request Aug 2, 2017
Emphasise that these functions look at the disk, not just the path

I thought that `PathBuf::new("foo/bar/").is_dir()` is always true, because the path ends in `/`. However, this is not what `is_dir()` function does. So I've updated the docs to make it clear.
@bors
Copy link
Collaborator

bors commented Aug 2, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: BurntSushi
Pushing b75d1f0 to master...

@bors bors merged commit 4792d28 into rust-lang:master Aug 2, 2017
@kornelski kornelski deleted the is_gotcha branch August 2, 2017 23:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants