}
if (st.st_uid != getuid()) {
- pa_log_error("Home directory %s not ours.", d);
+ pa_log_error("Home directory %s not ours.", h);
return NULL;
}
fn = lfn = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", e, local);
else if (pa_get_home_dir(h, sizeof(h)))
fn = lfn = pa_sprintf_malloc("%s" PA_PATH_SEP ".pulse" PA_PATH_SEP "%s", h, local);
+ else
+ return NULL;
#ifdef OS_IS_WIN32
if (!ExpandEnvironmentStrings(lfn, buf, PATH_MAX)) {
#endif
if (env && (fn = getenv(env))) {
+
#ifdef OS_IS_WIN32
if (!ExpandEnvironmentStrings(fn, buf, PATH_MAX))
return NULL;
fn = lfn = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", e, local);
else if (pa_get_home_dir(h, sizeof(h)))
fn = lfn = pa_sprintf_malloc("%s" PA_PATH_SEP ".pulse" PA_PATH_SEP "%s", h, local);
+ else
+ return NULL;
#ifdef OS_IS_WIN32
if (!ExpandEnvironmentStrings(lfn, buf, PATH_MAX)) {
global = buf;
#endif
- if (access(fn, R_OK) == 0)
+ if (access(global, R_OK) == 0)
return pa_xstrdup(global);
} else
errno = ENOENT;