eymengunay / php-passbook

iOS passbook library for PHP
http://eymengunay.github.io/php-passbook/
MIT License
263 stars 53 forks source link

Should check isOverwrite() on prepareLocalizations() as well #92

Closed ioliva closed 2 years ago

ioliva commented 2 years ago

This mkdir() causes an error even if isOverwrite() returns true: https://github.com/eymengunay/php-passbook/blob/0a7949712e47ccd835d6d21211b3a36fbdda07e0/src/Passbook/PassFactory.php#L510

That's because isOverwrite() is checked only for the main pass directory, but not for the localizations subdirs. If isOverwrite() is true, the previous localization subdirs should be deleted as well, just before preparing the localizations again.

eymengunay commented 2 years ago

Hi @ioliva,

Thank you for pointing this out! Unfortunately I do not actively contribute to this repo however any bugfix/new feature PR's are always welcome.