Add NULL check when printing cwd on temp file fail
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
This commit is contained in:
parent
4e6b2b8f5a
commit
c30f2f3fd2
1 changed files with 4 additions and 2 deletions
|
@ -207,8 +207,10 @@ int write_files_fn(void *data, void *ud) {
|
||||||
SIMPLE_ARCHIVER_PLATFORM == SIMPLE_ARCHIVER_PLATFORM_LINUX
|
SIMPLE_ARCHIVER_PLATFORM == SIMPLE_ARCHIVER_PLATFORM_LINUX
|
||||||
__attribute__((cleanup(free_malloced_memory))) void *real_cwd =
|
__attribute__((cleanup(free_malloced_memory))) void *real_cwd =
|
||||||
realpath(".", NULL);
|
realpath(".", NULL);
|
||||||
|
if (real_cwd) {
|
||||||
fprintf(stderr, "Tried to create temp file(s) in \"%s\"!\n",
|
fprintf(stderr, "Tried to create temp file(s) in \"%s\"!\n",
|
||||||
(char *)real_cwd);
|
(char *)real_cwd);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"(Use \"--temp-files-dir <dir>\" to change where to write temp "
|
"(Use \"--temp-files-dir <dir>\" to change where to write temp "
|
||||||
|
|
Loading…
Reference in a new issue