diff options
author | John Högberg <[email protected]> | 2018-03-19 13:18:08 +0100 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-03-19 14:02:22 +0100 |
commit | f14a5306622994a6b49b25c63ec882a1551398ef (patch) | |
tree | f2e1c57288f586296138e9a2c305248c98434cd7 /erts/preloaded | |
parent | d171399bb5a0e9f4c6029564ece4fbf89f3c76f8 (diff) | |
download | otp-f14a5306622994a6b49b25c63ec882a1551398ef.tar.gz otp-f14a5306622994a6b49b25c63ec882a1551398ef.tar.bz2 otp-f14a5306622994a6b49b25c63ec882a1551398ef.zip |
Fix file:change_group/change_owner
It wasn't possible to change group/owner separately, and our test
suite lacked coverage for that.
ERL-589
Diffstat (limited to 'erts/preloaded')
-rw-r--r-- | erts/preloaded/ebin/prim_file.beam | bin | 27428 -> 27496 bytes | |||
-rw-r--r-- | erts/preloaded/src/prim_file.erl | 6 |
2 files changed, 4 insertions, 2 deletions
diff --git a/erts/preloaded/ebin/prim_file.beam b/erts/preloaded/ebin/prim_file.beam Binary files differindex 902b0945c6..9cc22222db 100644 --- a/erts/preloaded/ebin/prim_file.beam +++ b/erts/preloaded/ebin/prim_file.beam diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl index 35042a7c72..432a8c15cd 100644 --- a/erts/preloaded/src/prim_file.erl +++ b/erts/preloaded/src/prim_file.erl @@ -618,8 +618,10 @@ write_file_info_1(Filename, Info, TimeType) -> error:_ -> {error, badarg} end. -set_owner(_EncodedName, undefined, undefined) -> - ok; +set_owner(EncodedName, Uid, undefined) -> + set_owner(EncodedName, Uid, -1); +set_owner(EncodedName, undefined, Gid) -> + set_owner(EncodedName, -1, Gid); set_owner(EncodedName, Uid, Gid) -> set_owner_nif(EncodedName, Uid, Gid). set_owner_nif(_Path, _Uid, _Gid) -> |