Continue export on unpacking err

This commit is contained in:
Neeraj Gupta 2023-12-01 20:50:47 +05:30
parent 5d4c14a5d5
commit c4f203ac7c

View file

@ -1,6 +1,7 @@
package pkg
import (
"archive/zip"
"context"
"encoding/json"
"errors"
@ -70,6 +71,9 @@ func (c *ClICtrl) syncFiles(ctx context.Context, account model.Account) error {
if err != nil {
if errors.Is(err, model.ErrDecryption) {
continue
} else if existingEntry.IsLivePhoto() && errors.Is(err, zip.ErrFormat) {
log.Printf(fmt.Sprintf("err processing live photo %s (%d), %s", existingEntry.GetTitle(), existingEntry.ID, err.Error()))
continue
} else {
return err
}