Check return values from some syscalls and warn if they fail

This commit is contained in:
David Leadbeater 2014-07-06 21:52:03 +01:00
commit dac67a567d
3 changed files with 14 additions and 5 deletions

View file

@ -968,7 +968,9 @@ static void cmd_cd(const char *data)
if (*data == '\0') return;
str = convert_home(data);
chdir(str);
if (chdir(str) != 0) {
g_warning("Failed to chdir(): %s", strerror(errno));
}
g_free(str);
}