diff options
Diffstat (limited to '')
-rw-r--r-- | CHANGELOG.md | 6 | ||||
-rw-r--r-- | internal/imap/folder.go | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 651c0c6..f885f79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -### Added +### Changed - Remove `srcset` attribute of `img` tags when including images in mail +- Strip whitespaces from folder names + ### Fixed - [Issue #39](https://github.com/Necoro/feed2imap-go/issues/39): Do not re-introduce deleted mails, even though `reupload-if-updated` is false. +- [Issue #25](https://github.com/Necoro/feed2imap-go/issues/25): Normalize folder names, so `foo` and `foo/` are not seen as different folders. + ## [0.6.0] - 2021-02-14 ### Fixed diff --git a/internal/imap/folder.go b/internal/imap/folder.go index e845862..6353bb3 100644 --- a/internal/imap/folder.go +++ b/internal/imap/folder.go @@ -21,9 +21,17 @@ func (f Folder) Append(other Folder) Folder { } } +func buildFolderName(path []string, delimiter string) (name string) { + name = strings.Join(path, delimiter) + if delimiter != "" { + name = strings.Trim(name, delimiter[0:1]) + } + return +} + func (cl *Client) folderName(path []string) Folder { return Folder{ - strings.Join(path, cl.delimiter), + buildFolderName(path, cl.delimiter), cl.delimiter, } } |