summary refs log tree commit diff stats
path: root/compiler/pretty.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/pretty.nim')
-rw-r--r--compiler/pretty.nim28
1 files changed, 14 insertions, 14 deletions
diff --git a/compiler/pretty.nim b/compiler/pretty.nim
index b7265b946..436181bbc 100644
--- a/compiler/pretty.nim
+++ b/compiler/pretty.nim
@@ -31,20 +31,20 @@ type
 proc overwriteFiles*() =
   let doStrip = options.getConfigVar("pretty.strip").normalize == "on"
   for i in 0 .. high(gSourceFiles):
-    if not gSourceFiles[i].dirty: continue
-    let newFile = if gOverWrite: gSourceFiles[i].fullpath
-                  else: gSourceFiles[i].fullpath.changeFileExt(".pretty.nim")
-    try:
-      var f = open(newFile, fmWrite)
-      for line in gSourceFiles[i].lines:
-        if doStrip:
-          f.write line.strip(leading = false, trailing = true)
-        else:
-          f.write line
-        f.write("\L")
-      f.close
-    except IOError:
-      rawMessage(errCannotOpenFile, newFile)
+    if gSourceFiles[i].dirty and not gSourceFiles[i].isNimfixFile:
+      let newFile = if gOverWrite: gSourceFiles[i].fullpath
+                    else: gSourceFiles[i].fullpath.changeFileExt(".pretty.nim")
+      try:
+        var f = open(newFile, fmWrite)
+        for line in gSourceFiles[i].lines:
+          if doStrip:
+            f.write line.strip(leading = false, trailing = true)
+          else:
+            f.write line
+          f.write("\L")
+        f.close
+      except IOError:
+        rawMessage(errCannotOpenFile, newFile)
 
 proc `=~`(s: string, a: openArray[string]): bool =
   for x in a: