Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Solve the error when try to remove a file previously removed, the idea is to remove first the imagekeys files and then, the remaining files of the temporary directory #6

Merged
merged 1 commit into from
Mar 26, 2021

Conversation

josepsanzcamp
Copy link
Contributor

@josepsanzcamp josepsanzcamp commented Mar 25, 2021

Solve the error when try to remove a file previously removed, the idea is to remove first the imagekeys files and then, the remaining files of the temporary directory

…a is to remove first the imagekeys files and then, the remaining files of the temporary directory
@codecov
Copy link

codecov bot commented Mar 25, 2021

Codecov Report

Merging #6 (ad5d30b) into main (11269e4) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main       #6   +/-   ##
=======================================
  Coverage   72.05%   72.05%           
=======================================
  Files         125      125           
  Lines       22873    22873           
=======================================
  Hits        16482    16482           
  Misses       6391     6391           
Flag Coverage Δ
php-5.3-ubuntu-latest 71.59% <100.00%> (-0.01%) ⬇️
php-5.4-ubuntu-latest 71.75% <100.00%> (+0.01%) ⬆️
php-5.5-ubuntu-latest 71.75% <100.00%> (+<0.01%) ⬆️
php-5.6-ubuntu-latest 46.95% <100.00%> (ø)
php-7.1-ubuntu-latest 47.34% <100.00%> (-0.01%) ⬇️
php-7.2-ubuntu-latest 47.30% <100.00%> (+0.01%) ⬆️
php-7.3-ubuntu-latest 47.29% <100.00%> (+0.01%) ⬆️
php-7.4-ubuntu-latest 47.28% <100.00%> (-0.01%) ⬇️
php-8.0-ubuntu-latest 64.55% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tcpdf.php 70.95% <100.00%> (ø)
examples/example_047.php 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11269e4...ad5d30b. Read the comment docs.

@williamdes
Copy link
Member

Would you mind adding an example that covers your case file to examples/ ?

@josepsanzcamp
Copy link
Contributor Author

Would you mind adding an example that covers your case file to examples/ ?

Hi @williamdes, currently my aportation only optimize the execution, currently not solves any error because I see that the latest code protect the original error by the file_exists, but in essency, the idea is to first remove the knowed files and then, search for untracked files to remove too.

This patch was originaly PR in the TCPDF repository (tecnickcom/TCPDF#340) but someone comments me that maybe is more better to PR to this repository instead the abandonated TCPDF repository.

In any case, the title or the PR is not correct, because with the 7.0.0 the error was fixed by the file_exists but the code movement that I propose is more optimal because unlink the knowed files and then unlink the untracked tcpdf files.

Thanks in advance by your maintenance and evolution work in this library.

@williamdes williamdes self-assigned this Mar 26, 2021
@williamdes williamdes added this to the 7.0.0 milestone Mar 26, 2021
@williamdes williamdes changed the title Solve the error when try to remove a file previously removed, the ide… Solve the error when try to remove a file previously removed, the idea is to remove first the imagekeys files and then, the remaining files of the temporary directory Mar 26, 2021
@williamdes
Copy link
Member

Thanks in advance by your maintenance and evolution work in this library.

Thank you too for contributing

Copy link
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

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

Good improvement !

@williamdes williamdes merged commit 48676e3 into code-lts:main Mar 26, 2021
tcpdf.php Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants