diff --git a/kernel/src/Fs/Ramdisk.cpp b/kernel/src/Fs/Ramdisk.cpp index 3956e3b..8a224a5 100644 --- a/kernel/src/Fs/Ramdisk.cpp +++ b/kernel/src/Fs/Ramdisk.cpp @@ -218,6 +218,13 @@ namespace Fs::Ramdisk { } int ReadDirAt(const char* path, const char** outNames, int maxEntries, int startIndex) { + // Reject outright if path names an existing regular file: without this, + // a file with no matching "path/..." children below falls through to + // the child-scan loop and returns 0 (empty), which callers that use + // ReadDir to test "is this a directory" (>= 0) misread as "yes". + int selfIdx = FindEntryByPath(path); + if (selfIdx >= 0 && !fileTable[selfIdx].isDirectory) return -1; + // Normalize path: skip leading '/' if (path[0] == '/') path++; diff --git a/montaukos.org/downloads.html b/montaukos.org/downloads.html index 7132f08..79c3312 100644 --- a/montaukos.org/downloads.html +++ b/montaukos.org/downloads.html @@ -132,9 +132,10 @@

Known issues

Included in ISO