From 23d7d90d206864e91a2ed4fba7016c8dd324d922 Mon Sep 17 00:00:00 2001 From: shoopea Date: Fri, 17 Jun 2022 22:03:12 +0800 Subject: [PATCH] cleanup only when source is up --- app.go | 6 ++++-- version.go | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app.go b/app.go index 4bcf509..92d4ae4 100644 --- a/app.go +++ b/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() + } } } } diff --git a/version.go b/version.go index b19b2af..79358d5 100644 --- a/version.go +++ b/version.go @@ -1,6 +1,6 @@ // Code generated by version.sh (@generated) DO NOT EDIT. package main -var githash = "93169ff" -var buildstamp = "2022-06-17_13:57:23" -var commits = "38" -var version = "93169ff-b38 - 2022-06-17_13:57:23" +var githash = "28bae81" +var buildstamp = "2022-06-17_14:02:53" +var commits = "39" +var version = "28bae81-b39 - 2022-06-17_14:02:53"