1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 01:02:24 +00:00

uxpty.c: silence compiler warning about chdir().

I didn't check the error code, which for some reason didn't give me a
-Werror warning on Ubuntu 18.04, but does on 16.04.
This commit is contained in:
Simon Tatham 2019-04-01 20:04:48 +01:00
parent 2e3a1c6d69
commit 3d8563ec9d

View File

@ -1145,8 +1145,12 @@ Backend *pty_backend_create(
}
}
if (dir)
chdir(dir);
if (dir) {
if (chdir(dir) < 0) {
/* Ignore the error - nothing we can sensibly do about it,
* and our existing cwd is as good a fallback as any. */
}
}
/*
* SIGINT, SIGQUIT and SIGPIPE may have been set to ignored by