Commit 84671026 authored by Jonas Termansen's avatar Jonas Termansen

Fix ls(1) not checking stat_record()'s error correctly.

parent db90720c
......@@ -814,7 +814,7 @@ static int ls_directory(int parentfd, const char* relpath, const char* path)
memset(record, 0, sizeof(*record));
if ( !(record->dirent = dirent_dup(entry)) )
err(1, "malloc");
if ( stat_record(dir, path, record) < 0 )
if ( !stat_record(dir, path, record) )
ret = 1;
record->no_recurse = isdotdot;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment