diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-09-21 19:07:25 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-09-21 19:07:25 +0200 |
commit | 39185b46ca285ee9ca40d09331cea73056f524ca (patch) | |
tree | 7528da1bd2bd69260e5b6bc1300b4a3cb75b1136 | |
parent | e0f2b3ba8fb23a37adffece73bdc466e3e0a7072 (diff) | |
download | Nim-39185b46ca285ee9ca40d09331cea73056f524ca.tar.gz |
living in unix-land, eye to eye, where nothing ever works; fixes #12226
-rw-r--r-- | compiler/options.nim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/options.nim b/compiler/options.nim index 3a705ff8b..da01937fe 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -473,12 +473,16 @@ proc getOutFile*(conf: ConfigRef; filename: RelativeFile, ext: string): Absolute conf.outDir / changeFileExt(filename, ext) proc absOutFile*(conf: ConfigRef): AbsoluteFile = - conf.outDir / conf.outFile + result = conf.outDir / conf.outFile + if dirExists(result.string): + result.string.add ".out" proc prepareToWriteOutput*(conf: ConfigRef): AbsoluteFile = ## Create the output directory and returns a full path to the output file createDir conf.outDir - return conf.outDir / conf.outFile + result = conf.outDir / conf.outFile + if dirExists(result.string): + result.string.add ".out" proc getPrefixDir*(conf: ConfigRef): AbsoluteDir = ## Gets the prefix dir, usually the parent directory where the binary resides. |