Skip to content

fix: convert Finder lazy iterator to array before deletion #2663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

ilyaplot
Copy link
Contributor

@ilyaplot ilyaplot commented Apr 8, 2025

Finder returns a live iterator that updates as files and directories are removed, causing some items to be skipped during deletion. This change converts the iterator to an array using iterator_to_array(), fixing the issue where not all files were deleted in one pass.

Closes googleapis/google-api-php-client-services#6502

Finder returns a live iterator that updates as files and directories are removed,
causing some items to be skipped during deletion. This change converts the iterator
to an array using `iterator_to_array()`, fixing the issue where not all files were
deleted in one pass.

Closes googleapis/google-api-php-client-services#6502
@bshaffer bshaffer merged commit c699405 into googleapis:main Apr 8, 2025
11 of 12 checks passed
@ilyaplot ilyaplot deleted the fix/ISSUE-6502 branch April 8, 2025 22:38
Copy link

@mustafacryptolife mustafacryptolife left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Copy link

@mustafacryptolife mustafacryptolife left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Google\Task\Composer::cleanup doesn't remove all of ignored services
3 participants