diff options
author | Araq <rumpf_a@web.de> | 2011-12-22 15:36:36 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-12-22 15:36:36 +0100 |
commit | cc490b35b0b20c9a039fa13ca00a3bdb27473f95 (patch) | |
tree | 46954eeb738ef4179d3c0aea88650f5f325a6fe1 /lib/pure | |
parent | f1f458137bf26cfea595eb373388a5f8b71ce4b4 (diff) | |
download | Nim-cc490b35b0b20c9a039fa13ca00a3bdb27473f95.tar.gz |
bugfix: environment var caching is now thread safe
Diffstat (limited to 'lib/pure')
-rwxr-xr-x | lib/pure/os.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index f22a53dd8..32a248f15 100755 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -554,7 +554,7 @@ proc cmpPaths*(pathA, pathB: string): int {. proc isAbsolute*(path: string): bool {.rtl, noSideEffect, extern: "nos$1".} = ## Checks whether a given `path` is absolute. ## - ## on Windows, network paths are considered absolute too. + ## On Windows, network paths are considered absolute too. when doslike: var len = len(path) result = (len > 1 and path[0] in {'/', '\\'}) or @@ -694,8 +694,8 @@ proc execShellCmd*(command: string): int {.rtl, extern: "nos$1".} = # iterator depends on ``environment``. var - envComputed: bool = false - environment: seq[string] = @[] + envComputed {.threadvar.}: bool = false + environment {.threadvar.}: seq[string] = @[] when defined(windows): # because we support Windows GUI applications, things get really |