X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Ftoss.go;h=2c4726f8cb7dc7fc2e94334fe8b97c1d3363eac6;hb=0139e8deda4112d2c3dcd52e0ad72162e54caa03;hp=6422ac7a8ccb7e575f923262fb6e9dd122bdedcb;hpb=7c76d091cb333bba696c290c69ce4df14110ae81;p=nncp.git diff --git a/src/toss.go b/src/toss.go index 6422ac7..2c4726f 100644 --- a/src/toss.go +++ b/src/toss.go @@ -43,7 +43,7 @@ const ( SeenSuffix = ".seen" ) -func newNotification(fromTo *FromToYAML, subject string) io.Reader { +func newNotification(fromTo *FromToJSON, subject string) io.Reader { return strings.NewReader(fmt.Sprintf( "From: %s\nTo: %s\nSubject: %s\n", fromTo.From, @@ -221,7 +221,7 @@ func (ctx *Ctx) Toss( isBad = true goto Closing } - dstPath = dstPathOrig + strconv.Itoa(dstPathCtr) + dstPath = dstPathOrig + "." + strconv.Itoa(dstPathCtr) dstPathCtr++ } if err = os.Rename(tmp.Name(), dstPath); err != nil {