diff options
author | Kent Mein <mein@cs.umn.edu> | 2004-04-05 21:07:06 +0400 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2004-04-05 21:07:06 +0400 |
commit | 9802db019d876be2cc2a9d177a5207fa3c721f31 (patch) | |
tree | 4404256360859066e08a9e1d5e8d0afd165950f1 /source/blender/blenlib/intern/storage.c | |
parent | bc060ca26f07135f73b51d93d783a9085889dff5 (diff) |
Rick Kimball's patch Basically it checks to make sure the unix platforms
were able to find a user before copying that user as the owner.
Kent
Diffstat (limited to 'source/blender/blenlib/intern/storage.c')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 19f6f8096fe..4c14fe3db5f 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -356,7 +356,11 @@ void BLI_adddirstrings() strcpy(files[num].owner,"user"); #else pwuser = getpwuid(files[num].s.st_uid); - strcpy(files[num].owner, pwuser->pw_name); + if ( pwuser ) { + strcpy(files[num].owner, pwuser->pw_name); + } else { + sprintf(files[num].owner, "%d", files[num].s.st_uid); + } #endif tm= localtime(&files[num].s.st_mtime); |