X-Git-Url: http://www.git.cypherpunks.ru/?p=nncp.git;a=blobdiff_plain;f=src%2Fcmd%2Fnncp-xfer%2Fmain.go;h=68aa102aa68970c117444499bf51b90951f75b31;hp=41e8c61c8e157f087d9fa5096990d92231bf316d;hb=891cee4997bb0a269d4b2f35311bab104bdc3283;hpb=53b736c0d8998982b232e8f25d27753ea3a1e309 diff --git a/src/cmd/nncp-xfer/main.go b/src/cmd/nncp-xfer/main.go index 41e8c61..68aa102 100644 --- a/src/cmd/nncp-xfer/main.go +++ b/src/cmd/nncp-xfer/main.go @@ -477,13 +477,15 @@ Tx: isBad = true continue } - if err = tmp.Sync(); err != nil { - tmp.Close() - ctx.LogE("xfer-tx-sync", les, err, func(les nncp.LEs) string { - return logMsg(les) + ": syncing" - }) - isBad = true - continue + if !nncp.NoSync { + if err = tmp.Sync(); err != nil { + tmp.Close() + ctx.LogE("xfer-tx-sync", les, err, func(les nncp.LEs) string { + return logMsg(les) + ": syncing" + }) + isBad = true + continue + } } if err = tmp.Close(); err != nil { ctx.LogE("xfer-tx-close", les, err, func(les nncp.LEs) string {