Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorKent Mein <mein@cs.umn.edu>2004-04-05 21:07:06 +0400
committerKent Mein <mein@cs.umn.edu>2004-04-05 21:07:06 +0400
commit9802db019d876be2cc2a9d177a5207fa3c721f31 (patch)
tree4404256360859066e08a9e1d5e8d0afd165950f1 /source
parentbc060ca26f07135f73b51d93d783a9085889dff5 (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')
-rw-r--r--source/blender/blenlib/intern/storage.c6
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);