Skip to content

Commit 8b4890c

Browse files
committed
fixup after #13212 isRelativeTo got merged
1 parent bf1390a commit 8b4890c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tools/kochdocs.nim

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,13 @@ lib/posix/posix_openbsd_amd64.nim
170170
# but contain potentially valuable docs on OS-specific symbols (eg OSX) that
171171
# don't end up in the main docs; we ignore these for now.
172172

173-
proc isRelativeTo(path, base: string): bool =
174-
# pending #13212 use os.isRelativeTo
175-
let path = path.normalizedPath
176-
let base = base.normalizedPath
177-
let ret = relativePath(path, base)
178-
result = path.len > 0 and not ret.startsWith ".."
173+
when (NimMajor, NimMinor) < (1, 1) or not declared(isRelativeTo):
174+
proc isRelativeTo(path, base: string): bool =
175+
# pending #13212 use os.isRelativeTo
176+
let path = path.normalizedPath
177+
let base = base.normalizedPath
178+
let ret = relativePath(path, base)
179+
result = path.len > 0 and not ret.startsWith ".."
179180

180181
proc getDocList(): seq[string] =
181182
var t: HashSet[string]

0 commit comments

Comments
 (0)