Skip to content

Commit b25f9db

Browse files
committed
Fixup
1 parent fca27e7 commit b25f9db

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

source/dub/internal/io/mockfs.d

+1-4
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,8 @@ public class FSEntry
459459
/// Returns: The `path` of this FSEntry
460460
public NativePath path () const scope
461461
{
462-
version (Windows) enum RootPath = "T:\\";
463-
else enum RootPath = "/";
464-
465462
if (this.parent is null)
466-
return NativePath(RootPath);
463+
return this.name.length ? NativePath(this.name) : NativePath("/");
467464
assert(!NativePath(this.name).absolute, this.name);
468465
auto thisPath = this.parent.path ~ this.name;
469466
thisPath.endsWithSlash = (this.attributes.type == Type.Directory);

0 commit comments

Comments
 (0)