diff options
Diffstat (limited to 'lib/Utils/xfuncs.cpp')
-rw-r--r-- | lib/Utils/xfuncs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp index 53c10f9a..89273675 100644 --- a/lib/Utils/xfuncs.cpp +++ b/lib/Utils/xfuncs.cpp @@ -276,11 +276,11 @@ void xstat(const char *name, struct stat *stat_buf) perror_msg_and_die("can't stat '%s'", name); } -std::string get_home_dir(uid_t uid) +const char *get_home_dir(uid_t uid) { struct passwd* pw = getpwuid(uid); // TODO: handle errno - return pw ? pw->pw_dir : ""; + return pw ? pw->pw_dir : NULL; } // Die if we can't open a file and return a fd |