Skip to content

Commit

Permalink
fixup after nim-lang#13212 isRelativeTo got merged
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Jan 23, 2020
1 parent bf1390a commit 8b4890c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tools/kochdocs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,13 @@ lib/posix/posix_openbsd_amd64.nim
# but contain potentially valuable docs on OS-specific symbols (eg OSX) that
# don't end up in the main docs; we ignore these for now.

proc isRelativeTo(path, base: string): bool =
# pending #13212 use os.isRelativeTo
let path = path.normalizedPath
let base = base.normalizedPath
let ret = relativePath(path, base)
result = path.len > 0 and not ret.startsWith ".."
when (NimMajor, NimMinor) < (1, 1) or not declared(isRelativeTo):
proc isRelativeTo(path, base: string): bool =
# pending #13212 use os.isRelativeTo
let path = path.normalizedPath
let base = base.normalizedPath
let ret = relativePath(path, base)
result = path.len > 0 and not ret.startsWith ".."

proc getDocList(): seq[string] =
var t: HashSet[string]
Expand Down

0 comments on commit 8b4890c

Please sign in to comment.