From a5763d6feec5985c7fcf5e6bee1cd0a1830be685 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 27 May 2018 14:12:10 +0100 Subject: Err on empty directory packages --- src/parser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index 355e935ec..ceb7f5c6f 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -4253,7 +4253,7 @@ ParseFileError parse_import(Parser *p, ImportedPackage imported_package) { GB_ASSERT(import_path != list[0].fullpath); } - if (rd_err != ReadDirectory_EOF && rd_err != ReadDirectory_None) { + if (rd_err != ReadDirectory_None) { if (pos.line != 0) { gb_printf_err("%.*s(%td:%td) ", LIT(pos.file), pos.line, pos.column); } @@ -4282,9 +4282,9 @@ ParseFileError parse_import(Parser *p, ImportedPackage imported_package) { gb_printf_err("Unknown error whilst reading path %.*s\n", LIT(import_rel_path)); return ParseFile_InvalidFile; - case ReadDirectory_EOF: - gb_printf_err("Unknown error whilst reading path %.*s\n", LIT(import_rel_path)); - return ParseFile_InvalidFile; + case ReadDirectory_Empty: + gb_printf_err("Empty directory: %.*s\n", LIT(import_rel_path)); + return ParseFile_EmptyFile; } } -- cgit v1.2.3