]> git.tuebingen.mpg.de Git - dss.git/commit
run: Improve error diagnostics for chdir(2) failure.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 16 Apr 2017 10:01:42 +0000 (12:01 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 13 Jul 2017 20:54:03 +0000 (22:54 +0200)
commit2d10a72798da5489363088dfbe02ccbc5942cfcd
tree53513fa6bfd79d3b9362cb89b7ddfae9150047d9
parent25b4f1983a3804353f5fc879f93ecde978a90aaf
run: Improve error diagnostics for chdir(2) failure.

In run mode, if the destination directory does not exist, dss prints
"No such file or directory" and exits, without telling the user (a)
it was a failed chdir(2) call that caused the error, and (b) the name
of the directory. This patch adds an error message containing this
information.

Since there is only one caller of dss_chdir(), let's get rid
of this public function in file.c and call chdir() directly from
change_to_dest_dir() of dss.c.
dss.c
file.c
file.h