Skip to content

Commit d66a3a0

Browse files
committed
main (libutil): abort if getcwd fails
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent b9fe6fd commit d66a3a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/routines.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ extern void setCurrentDirectory (void) /* TODO */
429429
CurrentDirectory = xMalloc ((size_t) (PATH_MAX + 1), char);
430430
buf = getcwd (CurrentDirectory, PATH_MAX);
431431
if (buf == NULL)
432-
perror ("");
432+
error (FATAL | PERROR, "failed in getcwd()");
433433
if (! isPathSeparator (CurrentDirectory [strlen (CurrentDirectory) - (size_t) 1]))
434434
{
435435
sprintf (CurrentDirectory + strlen (CurrentDirectory), "%c",

0 commit comments

Comments
 (0)