diff options
| author | gingerBill <bill@gingerbill.org> | 2018-05-27 14:12:10 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-05-27 14:12:10 +0100 |
| commit | a5763d6feec5985c7fcf5e6bee1cd0a1830be685 (patch) | |
| tree | 32154163796a706c51061b782760680a38f6d9f9 /src/common.cpp | |
| parent | 95482c554d087045b24458efb787267d606f6404 (diff) | |
Err on empty directory packages
Diffstat (limited to 'src/common.cpp')
| -rw-r--r-- | src/common.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common.cpp b/src/common.cpp index cb6d15cc1..274b86bf2 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -751,7 +751,7 @@ enum ReadDirectoryError { ReadDirectory_NotExists, ReadDirectory_Permission, ReadDirectory_NotDir, - ReadDirectory_EOF, + ReadDirectory_Empty, ReadDirectory_Unknown, ReadDirectory_COUNT, @@ -858,6 +858,9 @@ ReadDirectoryError read_directory(String path, Array<FileInfo> *fi) { } while (FindNextFileW(find_file, &file_data)); + if (fi->count == 0) { + return ReadDirectory_Empty; + } return ReadDirectory_None; } |