Skip to content

armgit / ente

Public Imported from GitHub
0

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

Respect export filters for deleted collections

Neeraj Gupta9a61dc1b0128
diff --git a/cli/pkg/remote_to_disk_album.go b/cli/pkg/remote_to_disk_album.go
index 9a5c62bee0..1808fb9ae9 100644
--- a/cli/pkg/remote_to_disk_album.go
+++ b/cli/pkg/remote_to_disk_album.go
@@ -27,11 +27,11 @@ func (c *ClICtrl) createLocalFolderForRemoteAlbums(ctx context.Context, account
filter := ctx.Value(model.FilterKey).(model.Filter)
for _, album := range albums {
if album.IsDeleted {
- if (filter.ExcludeShared && album.IsShared) ||
- (filter.ExcludeHidden && album.IsHidden()) {
- continue
- }
if meta, ok := albumIDToMetaMap[album.ID]; ok {
+ album.AlbumName = meta.AlbumName
+ if filter.SkipAlbum(album, false) {
+ continue
+ }
log.Printf("Deleting album %s as it is deleted", meta.AlbumName)
if err = os.RemoveAll(filepath.Join(path, meta.FolderName)); err != nil {
return err
diff --git a/cli/pkg/remote_to_disk_file.go b/cli/pkg/remote_to_disk_file.go
index 5eec8519b7..b3a56a31b9 100644
--- a/cli/pkg/remote_to_disk_file.go
+++ b/cli/pkg/remote_to_disk_file.go
@@ -31,7 +31,7 @@ func (c *ClICtrl) syncFiles(ctx context.Context, account model.Account) error {
return readAlbumErr
}
for _, album := range remoteAlbums {
- if filter.SkipAlbum(album, false) {
+ if album.IsDeleted || filter.SkipAlbum(album, false) {
albumsToSkip[album.ID] = true
}
}