taking wrong box for cleanup

This commit is contained in:
shoopea
2023-07-31 10:46:02 +02:00
parent 88220d47e6
commit f4487acb47
3 changed files with 22 additions and 18 deletions

View File

@@ -214,12 +214,12 @@ func (c *Config) Cleanup(e *Email) {
}
}
for _, dest := range a.destinations {
if b, ok := c.box[src.Box()]; ok {
d := dest.Append("/" + src.Box() + "/" + src.Path())
if fs, ok := b.zfs.filesystems[d.Path()]; ok {
if b, ok := c.box[dest.Box()]; ok {
dest2 := dest.Append("/" + src.Box() + "/" + src.Path())
if fs, ok := b.zfs.filesystems[dest2.Path()]; ok {
fs.destApps = append(fs.destApps, a)
} else {
e.AddItem(fmt.Sprintf(" - Dest : No folder (%s)", d.String()))
e.AddItem(fmt.Sprintf(" - Dest : No folder (%s)", dest2.String()))
}
}
}