summaryrefslogtreecommitdiff
path: root/cmd/getallhocrs/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/getallhocrs/main.go')
-rw-r--r--cmd/getallhocrs/main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/getallhocrs/main.go b/cmd/getallhocrs/main.go
index 136f07e..696a5fc 100644
--- a/cmd/getallhocrs/main.go
+++ b/cmd/getallhocrs/main.go
@@ -68,6 +68,13 @@ func main() {
if !strings.HasSuffix(o, ".hocr") {
continue
}
+ // skip already downloaded items
+ _, err = os.Stat(o)
+ if err == nil || os.IsExist(err) {
+ log.Println(" Skipping already complete download of", o)
+ continue
+ }
+ log.Println(" Downloading", o)
err = conn.Download(conn.WIPStorageId(), o, o)
if err != nil {
log.Fatalln("Failed to download file", o, err)