[PATCH] export/todo: Skip tracker if dump already exists
Export this patch
---
export/todo.go | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/export/todo.go b/export/todo.go
index dadd214..4512faf 100644
--- a/export/todo.go
+++ b/export/todo.go
@@ -71,6 +71,11 @@ func (ex *TodoExporter) Export(ctx context.Context, dir string) error {
func (ex *TodoExporter) exportTracker(ctx context.Context, tracker todosrht.Tracker, base string) error {
infoPath := path.Join(base, infoFilename)
+ if _, err := os.Stat(infoPath); err == nil {
+ log.Printf("\tSkipping %s (already exists)", tracker.Name)
+ return nil
+ }
+
dataPath := path.Join(base, "tracker.json.gz")
log.Printf("\t%s", tracker.Name)
if err := os.MkdirAll(base, 0o755); err != nil {
base-commit: d38890e3b652d21f7867317b3aa9013d59422088
prerequisite-patch-id: c89d1829563c41db0a6b40cee395fac5126a07fe
--
2.41.0
Pushed, thanks!