aboutsummaryrefslogtreecommitdiff
path: root/internal/imap/imap.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2021-10-17 13:33:55 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2021-10-17 13:33:55 +0200
commit50a50d736b5d5f1e9e2ef3c6afa6b4c0d3e50677 (patch)
treef227a996214cdaf4f6b099a7fe3dc7f09394fb5d /internal/imap/imap.go
parentc369f615b0b53471a9f6d214e847bcaa1703ea5a (diff)
downloadfeed2imap-go-50a50d736b5d5f1e9e2ef3c6afa6b4c0d3e50677.tar.gz
feed2imap-go-50a50d736b5d5f1e9e2ef3c6afa6b4c0d3e50677.tar.bz2
feed2imap-go-50a50d736b5d5f1e9e2ef3c6afa6b4c0d3e50677.zip
#62: Root can be empty
Diffstat (limited to 'internal/imap/imap.go')
-rw-r--r--internal/imap/imap.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/imap/imap.go b/internal/imap/imap.go
index a6995af..4a18a94 100644
--- a/internal/imap/imap.go
+++ b/internal/imap/imap.go
@@ -39,8 +39,10 @@ func Connect(url config.Url) (*Client, error) {
log.Printf("Determined '%s' as toplevel, with '%s' as delimiter", client.toplevel, client.delimiter)
- if err = conn.ensureFolder(client.toplevel); err != nil {
- return nil, err
+ if toplevel != "" {
+ if err = conn.ensureFolder(client.toplevel); err != nil {
+ return nil, err
+ }
}
// the other connections