diff options
author | John Högberg <[email protected]> | 2018-03-20 10:13:41 +0100 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-03-20 10:13:41 +0100 |
commit | 4022b9bf64bda0c9dcff5b0ea7423fd64d491506 (patch) | |
tree | 1f7df2b9ccbde6fd7733b79f2891d48a6584ffa0 /erts/preloaded/src/prim_file.erl | |
parent | 6751506b67e3ba6f4ce9eacd040ea269fca643fd (diff) | |
parent | f14a5306622994a6b49b25c63ec882a1551398ef (diff) | |
download | otp-4022b9bf64bda0c9dcff5b0ea7423fd64d491506.tar.gz otp-4022b9bf64bda0c9dcff5b0ea7423fd64d491506.tar.bz2 otp-4022b9bf64bda0c9dcff5b0ea7423fd64d491506.zip |
Merge branch 'john/erts/fix-set-owner-group/ERL-589'
* john/erts/fix-set-owner-group/ERL-589:
Fix file:change_group/change_owner
Diffstat (limited to 'erts/preloaded/src/prim_file.erl')
-rw-r--r-- | erts/preloaded/src/prim_file.erl | 6 |
1 files changed, 4 insertions, 2 deletions
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) -> |