config: do not ignore return value from getcwd()

This commit is contained in:
Jaroslav Kysela 2014-09-08 17:19:39 +02:00
parent fe4dbc2c50
commit 04e9466164

View file

@ -976,7 +976,10 @@ dobackup(const char *oldver)
tvhinfo("config", "backup: migrating config from %s (running %s)",
oldver, tvheadend_version);
getcwd(cwd, sizeof(cwd));
if (getcwd(cwd, sizeof(cwd)) == NULL) {
tvherror("config", "unable to get the current working directory");
goto fatal;
}
if (!access("/bin/tar", X_OK))
argv[0] = "/bin/tar";