Fix zero byte index computation.

This commit is contained in:
Sönke Ludwig 2021-01-12 17:38:32 +01:00
parent ca1fe41421
commit 5e6231c738

View file

@ -1033,7 +1033,7 @@ private void performListDirectory(ListDirectoryRequest req)
continue; continue;
FileInfo fi; FileInfo fi;
auto zi = de.d_name[].countUntil(0); auto zi = de.d_name[].representation.countUntil(0);
if (zi < 0) zi = de.d_name.length; if (zi < 0) zi = de.d_name.length;
if (de.d_name[0 .. zi].among(".", "..")) if (de.d_name[0 .. zi].among(".", ".."))
continue; continue;