From 44f1d91f592b2f7d145eb7366fede482488f64cb Mon Sep 17 00:00:00 2001 From: Mathias Lang Date: Sat, 13 Jul 2024 01:10:55 +0200 Subject: [PATCH] Fixup --- source/dub/internal/io/mockfs.d | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/dub/internal/io/mockfs.d b/source/dub/internal/io/mockfs.d index 8afa2c93a..1cb60132b 100644 --- a/source/dub/internal/io/mockfs.d +++ b/source/dub/internal/io/mockfs.d @@ -459,11 +459,8 @@ public class FSEntry /// Returns: The `path` of this FSEntry public NativePath path () const scope { - version (Windows) enum RootPath = "T:\\"; - else enum RootPath = "/"; - if (this.parent is null) - return NativePath(RootPath); + return this.name.length ? NativePath(this.name) : NativePath("/"); assert(!NativePath(this.name).absolute, this.name); auto thisPath = this.parent.path ~ this.name; thisPath.endsWithSlash = (this.attributes.type == Type.Directory);