cleanup only when source is up
This commit is contained in:
6
app.go
6
app.go
@@ -681,8 +681,10 @@ func (a AppConfig) CleanupSnapshot() error {
|
||||
for _, dest := range a.Destinations {
|
||||
if cfg.Box[dest.Box()].online {
|
||||
for _, src := range a.Sources {
|
||||
cleanupSnapshot[src.Box()] = cleanupSnapshot[src.Box()] + " " + src.Path()
|
||||
cleanupSnapshot[dest.Box()] = cleanupSnapshot[dest.Box()] + " " + dest.Path() + "/" + src.Box() + "/" + src.Path()
|
||||
if cfg.Box[src.Box()].online {
|
||||
cleanupSnapshot[src.Box()] = cleanupSnapshot[src.Box()] + " " + src.Path()
|
||||
cleanupSnapshot[dest.Box()] = cleanupSnapshot[dest.Box()] + " " + dest.Path() + "/" + src.Box() + "/" + src.Path()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user