X-Git-Url: http://git.tuebingen.mpg.de/?p=dss.git;a=blobdiff_plain;f=dss.c;h=5e2ef46f71251c6a157f2f9df02900c8e534a3a9;hp=8547f24a55e6c218d76fe002f7c76baa6c81e958;hb=2d10a72798da5489363088dfbe02ccbc5942cfcd;hpb=25b4f1983a3804353f5fc879f93ecde978a90aaf diff --git a/dss.c b/dss.c index 8547f24..5e2ef46 100644 --- a/dss.c +++ b/dss.c @@ -1055,9 +1055,15 @@ static int handle_sigchld(void) static int change_to_dest_dir(void) { + int ret; const char *dd = OPT_STRING_VAL(DSS, DEST_DIR); + DSS_INFO_LOG(("changing cwd to %s\n", dd)); - return dss_chdir(dd); + if (chdir(dd) >= 0) + return 1; + ret = -ERRNO_TO_DSS_ERROR(errno); + DSS_ERROR_LOG(("could not change cwd to %s\n", dd)); + return ret; } static int check_config(const struct lls_command *cmd)