mirror of https://git.kore.io/kore.git
Don't run cli_cleanup_files() in cli_fatal if theres no rootdir
This commit is contained in:
parent
5fa964c5c0
commit
448f1a7912
13
src/cli.c
13
src/cli.c
|
@ -715,11 +715,14 @@ cli_fatal(const char *fmt, ...)
|
|||
(void)vsnprintf(buf, sizeof(buf), fmt, args);
|
||||
va_end(args);
|
||||
|
||||
l = snprintf(spath, sizeof(spath), "%s/.objs", rootdir);
|
||||
if (l == -1 || (size_t)l >= sizeof(spath)) {
|
||||
printf("couldn't create spath for cleanup: %s\n", errno_s);
|
||||
} else {
|
||||
cli_cleanup_files(spath);
|
||||
if (rootdir != NULL) {
|
||||
l = snprintf(spath, sizeof(spath), "%s/.objs", rootdir);
|
||||
if (l == -1 || (size_t)l >= sizeof(spath)) {
|
||||
printf("couldn't create spath for cleanup: %s\n",
|
||||
errno_s);
|
||||
} else {
|
||||
cli_cleanup_files(spath);
|
||||
}
|
||||
}
|
||||
|
||||
if (command != NULL)
|
||||
|
|
Loading…
Reference in New Issue