diff options
Diffstat (limited to 'tdeinit/lnusertemp.c')
-rw-r--r-- | tdeinit/lnusertemp.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tdeinit/lnusertemp.c b/tdeinit/lnusertemp.c index 5d739f680..4358c40f6 100644 --- a/tdeinit/lnusertemp.c +++ b/tdeinit/lnusertemp.c @@ -124,14 +124,15 @@ int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname) if (kde_home[0] == '~') { - if (uid == 0) - { - home_dir = pw_ent->pw_dir ? pw_ent->pw_dir : "/root"; - } if (!home_dir || !home_dir[0]) { - fprintf(stderr, "[lnusertemp] Aborting. $HOME not set!\n"); - return 1; + if ( uid == 0 ) { + home_dir = pw_ent->pw_dir ? pw_ent->pw_dir : "/root"; + } + else { + fprintf(stderr, "[lnusertemp] Aborting. $HOME not set!\n"); + return 1; + } } if (strlen(home_dir) > (PATH_MAX-100)) { |