diff options
author | narimiran <narimiran@disroot.org> | 2019-02-01 19:44:19 +0100 |
---|---|---|
committer | narimiran <narimiran@disroot.org> | 2019-02-01 19:44:19 +0100 |
commit | 237a36075a0af173fc4680e3e65eda246e097244 (patch) | |
tree | 7a7b4199706c2b3d908a8b618249dabdb27b4c6d | |
parent | 9bd0c2d59ad95a05db7d88fa7d086c90c65849cb (diff) | |
download | Nim-237a36075a0af173fc4680e3e65eda246e097244.tar.gz |
another quickfix for os.nim documentation
-rw-r--r-- | lib/pure/os.nim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 878444e74..e88c3c6e8 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -1252,9 +1252,10 @@ proc normalizePath*(path: var string) {.rtl, extern: "nos$1", tags: [], noNimScr ## * `normalizedPath proc <#normalizedPath,string>`_ for a version which returns ## a new string runnableExamples: - var a = "a///b//..//c///d" - a.normalizePath() - assert a == "a/c/d" + when defined(posix): + var a = "a///b//..//c///d" + a.normalizePath() + assert a == "a/c/d" path = pathnorm.normalizePath(path) when false: @@ -1291,7 +1292,8 @@ proc normalizedPath*(path: string): string {.rtl, extern: "nos$1", tags: [], noN ## * `absolutePath proc <#absolutePath,string>`_ ## * `normalizePath proc <#normalizePath,string>`_ for the in-place version runnableExamples: - assert normalizedPath("a///b//..//c///d") == "a/c/d" + when defined(posix): + assert normalizedPath("a///b//..//c///d") == "a/c/d" result = pathnorm.normalizePath(path) when defined(Windows) and not weirdTarget: |