Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[cli] Continue export on bad timestamp marshal error

Neeraj Guptaab17ae71d027
diff --git a/cli/pkg/model/errors.go b/cli/pkg/model/errors.go
index a18df3751a..46a1d15f2b 100644
--- a/cli/pkg/model/errors.go
+++ b/cli/pkg/model/errors.go
@@ -12,3 +12,7 @@ func ShouldRetrySync(err error) bool {
return strings.Contains(err.Error(), "read tcp") ||
strings.Contains(err.Error(), "dial tcp")
}
+
+func IsBadTimeStampError(err error) bool {
+ return strings.Contains(err.Error(), "year outside of range ")
+}
diff --git a/cli/pkg/remote_to_disk_file.go b/cli/pkg/remote_to_disk_file.go
index 87f5362c6b..f4abf3df50 100644
--- a/cli/pkg/remote_to_disk_file.go
+++ b/cli/pkg/remote_to_disk_file.go
@@ -89,6 +89,10 @@ func (c *ClICtrl) syncFiles(ctx context.Context, account model.Account) error {
continue
} else if existingEntry.IsLivePhoto() && errors.Is(err, model.ErrLiveZip) {
continue
+ } else if model.IsBadTimeStampError(err) {
+ log.Printf("Skipping file due to error %s (%d)", existingEntry.GetTitle(), existingEntry.ID)
+ log.Printf("CreationTime %v, ModidicationTime %v", existingEntry.GetCreationTime(), existingEntry.GetModificationTime())
+ continue
} else {
return err
}