aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CHANGELOG.md6
-rw-r--r--internal/imap/folder.go10
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,
}
}
d25b69d2df24ffeb86a941c97a7a124caaf&follow=1'>Removed outdated packagesRené 'Necoro' Neumann19-883/+0 2012-02-17MltonRené Neumann2-0/+62 2012-02-17Removed virtualboxRené Neumann21-993/+0 2012-01-30BumpRené 'Necoro' Neumann1-3/+3 2012-01-30BumpRené 'Necoro' Neumann1-0/+0 2012-01-30Apply changes from bugs.gentoo.orgRené 'Necoro' Neumann2-1/+19 2012-01-11diffarrayRené Neumann3-0/+37 2012-01-10Remove patched dovecot. Changes are upstreamRené 'Necoro' Neumann8-907/+0 2012-01-10Remove emacs variant -- this is now tracked in patchesRené 'Necoro' Neumann3-363/+0 2011-11-06amd64 for fcgi-cgiRené 'Necoro' Neumann2-2/+2 2011-11-06Forgot dovecot init-fileRené 'Necoro' Neumann1-0/+1