Skip to content

Commit

Permalink
Proper locked logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pepa65 committed Dec 3, 2023
1 parent 6340a70 commit 793adaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![GitHub](https://img.shields.io/github/license/pepa65/m2m.svg)](LICENSE)
# m2m - Move from POP3 to Maildir

* **v1.14.0**
* **v1.15.0**
* License: GPLv3+
* Just pull mails from POP3 servers (TLS can be disabled) and put them in local Maildirs.
* Proxies and Onion entry servers are supported.
Expand Down Expand Up @@ -41,7 +41,7 @@

## Help
```
m2m v1.14.0 - Move from POP3 to Maildir
m2m v1.15.0 - Move from POP3 to Maildir
* Downloading emails from POP3 servers and moving them into Maildir folders.
* Repo: github.com/pepa65/m2m
* Usage: m2m [ -h|--help | -q|--quiet ]
Expand Down
9 changes: 3 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"gopkg.in/yaml.v2"
)

const version = "1.14.0"
const version = "1.15.0"

type Config struct {
Username string
Expand Down Expand Up @@ -133,9 +133,7 @@ func main() { // I:accounts O:self,home IO:wg
logline := time.Now().Format("2006-01-02_15:04:05 ")
for _, file := range files {
n := accounts[file]
if n == "." {
logline += file + ": locked"
} else if n != "" {
if n != "" {
logline += file + ": " + n + " "
if n != "0" {
mails = true
Expand Down Expand Up @@ -163,8 +161,7 @@ func check(account string, m2mdir string, quiet bool) { // I:home O:accounts IO:
file, err := os.Open(lockfile)
if err == nil { // Account locked: skip
file.Close()
accounts[account] = "."
return
log.Panic("Locked")
}

filename := filepath.Join(m2mdir, account)
Expand Down

0 comments on commit 793adaa

Please sign in to comment.