projects
/
cumulus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a few items to the TODO list.
[cumulus.git]
/
scandir.cc
diff --git
a/scandir.cc
b/scandir.cc
index
d775219
..
f902fa0
100644
(file)
--- a/
scandir.cc
+++ b/
scandir.cc
@@
-357,12
+357,12
@@
void dump_inode(const string& path, // Path within snapshot
file_info["volatile"] = "1";
struct passwd *pwd = getpwuid(stat_buf.st_uid);
file_info["volatile"] = "1";
struct passwd *pwd = getpwuid(stat_buf.st_uid);
- if (pwd != NULL) {
+ if (pwd != NULL
&& pwd->pw_name != NULL
) {
file_info["user"] += " (" + uri_encode(pwd->pw_name) + ")";
}
struct group *grp = getgrgid(stat_buf.st_gid);
file_info["user"] += " (" + uri_encode(pwd->pw_name) + ")";
}
struct group *grp = getgrgid(stat_buf.st_gid);
- if (
pwd
!= NULL) {
+ if (
grp != NULL && grp->gr_name
!= NULL) {
file_info["group"] += " (" + uri_encode(grp->gr_name) + ")";
}
file_info["group"] += " (" + uri_encode(grp->gr_name) + ")";
}