Skip to content

Commit 36041c5

Browse files
player-03joshtynjala
authored andcommitted
Add support for Windows-style paths in Path.isAbsolute().
1 parent 1fa646f commit 36041c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/hxp/Path.hx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ class Path extends HaxePath
110110

111111
public static function isAbsolute(path:String):Bool
112112
{
113+
if (System.hostPlatform == WINDOWS && path.indexOf(":") == 1)
114+
{
115+
return true;
116+
}
117+
113118
if (StringTools.startsWith(path, "/") || StringTools.startsWith(path, "\\"))
114119
{
115120
return true;

0 commit comments

Comments
 (0)