From bc305261d97501c4c8451f8164bae62e0564e886 Mon Sep 17 00:00:00 2001 From: Dmitry Polienko Date: Sat, 22 Oct 2016 18:47:45 +0700 Subject: [PATCH] Fix isAbsolute for Windows root directories --- lib/pure/ospaths.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pure/ospaths.nim b/lib/pure/ospaths.nim index 56671ee624..3d3a105f0d 100644 --- a/lib/pure/ospaths.nim +++ b/lib/pure/ospaths.nim @@ -434,8 +434,8 @@ when not declared(getEnv) or defined(nimscript): ## On Windows, network paths are considered absolute too. when doslike: var len = len(path) - result = (len > 1 and path[0] in {'/', '\\'}) or - (len > 2 and path[0] in {'a'..'z', 'A'..'Z'} and path[1] == ':') + result = (len > 0 and path[0] in {'/', '\\'}) or + (len > 1 and path[0] in {'a'..'z', 'A'..'Z'} and path[1] == ':') elif defined(macos): result = path.len > 0 and path[0] != ':' elif defined(RISCOS):