[Issue 21250] New: dirEntries on non-existant directory causes assert error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 15 21:57:19 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21250
Issue ID: 21250
Summary: dirEntries on non-existant directory causes assert
error
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: john.loughran.colvin at gmail.com
% cat simple.d
void main() {
import std.file : dirEntries, SpanMode;
auto binDir = "/hist";
dirEntries(binDir, "*.bin", SpanMode.depth);
}
% dmd -run simple.d
core.exception.AssertError@/home/john/dlang/dmd-2.094.0-beta.1/linux/bin64/../../src/phobos/std/typecons.d(6450):
Assertion failure
----------------
??:? _d_assertp [0x564f99e8c949]
??:? void std.typecons.RefCounted!(std.file.DirIteratorImpl,
0).RefCounted.__dtor() [0x564f99e8ba18]
??:? void std.file.DirIterator.__fieldDtor() [0x564f99e904b4]
??:? ref @trusted std.file.DirIterator
std.file.DirIterator.__ctor(immutable(char)[], std.file.SpanMode, bool)
[0x564f99e90404]
??:?
std.algorithm.iteration.FilterResult!(std.file.dirEntries(immutable(char)[],
immutable(char)[], std.file.SpanMode, bool).f(std.file.DirEntry),
std.file.DirIterator).FilterResult std.file.dirEntries(immutable(char)[],
immutable(char)[], std.file.SpanMode, bool) [0x564f99e905c3]
??:? _Dmain [0x564f99e8b95e]
% dmd --version
DMD64 D Compiler v2.094.0-beta.1
--
More information about the Digitalmars-d-bugs
mailing list