Skip to content

Conversation

@abbradar
Copy link
Contributor

Part of #270

#[inline]
pub fn chown<P: ?Sized + NixPath>(path: &P, owner: Option<uid_t>, group: Option<gid_t>) -> Result<()> {
let res = try!(path.with_nix_path(|cstr| {
unsafe { ffi::chown(cstr.as_ptr(), owner.unwrap_or(0 - 1), group.unwrap_or(0 - 1)) }
Copy link
Member

Choose a reason for hiding this comment

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

could you add a tiny comment explaining the 0-1 thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@kamalmarhubi
Copy link
Member

@homu r+

@homu
Copy link
Contributor

homu commented Feb 19, 2016

📌 Commit 6a2522c has been approved by kamalmarhubi

homu added a commit that referenced this pull request Feb 20, 2016
@homu
Copy link
Contributor

homu commented Feb 20, 2016

⌛ Testing commit 6a2522c with merge 7c00440...

@homu
Copy link
Contributor

homu commented Feb 20, 2016

☀️ Test successful - status

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.

3 participants