We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fca27e7 commit b25f9dbCopy full SHA for b25f9db
source/dub/internal/io/mockfs.d
@@ -459,11 +459,8 @@ public class FSEntry
459
/// Returns: The `path` of this FSEntry
460
public NativePath path () const scope
461
{
462
- version (Windows) enum RootPath = "T:\\";
463
- else enum RootPath = "/";
464
-
465
if (this.parent is null)
466
- return NativePath(RootPath);
+ return this.name.length ? NativePath(this.name) : NativePath("/");
467
assert(!NativePath(this.name).absolute, this.name);
468
auto thisPath = this.parent.path ~ this.name;
469
thisPath.endsWithSlash = (this.attributes.type == Type.Directory);
0 commit comments