From 39185b46ca285ee9ca40d09331cea73056f524ca Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 21 Sep 2019 19:07:25 +0200 Subject: living in unix-land, eye to eye, where nothing ever works; fixes #12226 --- compiler/options.nim | 8 ++++++-- 1 file 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. -- cgit 1.4.1-2-gfad0