Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new os.isRelativeTo #13212

Merged
merged 4 commits into from
Jan 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address comments
  • Loading branch information
timotheecour committed Jan 21, 2020
commit 9cd60757170921c85863cfa99683563faf40e7b0
3 changes: 1 addition & 2 deletions lib/pure/os.nim
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,7 @@ proc relativePath*(path, base: string; sep = DirSep): string {.
ff = f.next(path)

proc isRelativeTo*(path: string, base: string): bool {.since: (1, 1).} =
## returns true if `path` is rooted under or equal to `base` modulo path
## normalization.
## Returns true if `path` is relative to `base`.
runnableExamples:
doAssert isRelativeTo("./foo//bar", "foo")
# doAssert isRelativeTo("foo/bar", ".") # pending #13211
Expand Down