]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cmd/nncp-bundle/main.go
NNCPNOSYNC environment variable
[nncp.git] / src / cmd / nncp-bundle / main.go
index d5603a99b1ab8cc2082cc219f46a3fb065321c14..071ecea039f4ff0fb5af801710790d4fa56f794c 100644 (file)
@@ -483,8 +483,10 @@ func main() {
                                        if err = bufTmp.Flush(); err != nil {
                                                log.Fatalln("Error during flushing:", err)
                                        }
-                                       if err = tmp.Sync(); err != nil {
-                                               log.Fatalln("Error during syncing:", err)
+                                       if !nncp.NoSync {
+                                               if err = tmp.Sync(); err != nil {
+                                                       log.Fatalln("Error during syncing:", err)
+                                               }
                                        }
                                        if err = tmp.Close(); err != nil {
                                                log.Fatalln("Error during closing:", err)