eric pouech (@epo) commented about programs/cmd/directory.c:
if ((file_total + dir_total == 0) && (level == 0)) { SetLastError (ERROR_FILE_NOT_FOUND); WCMD_print_error (); errorlevel = ERROR_INVALID_FUNCTION;
this shouldn't set errorlevel but return_code
and likely using ERROR_FILE_NOT_FOUND to mark that listing was empty