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

This commit is contained in:
Jonas 'Sortie' Termansen 2018-07-15 13:30:23 +02:00
parent db90720c01
commit 8467102662
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}