Skip to content
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

CO: remove file 'fileType' when deleting images #8770

Merged
merged 1 commit into from Jan 10, 2020

Conversation

@marekhanus
Copy link
Contributor

marekhanus commented Feb 18, 2018

Questions Answers
Branch? develop
Description? When deleting image, in each directory stay file named 'fileType', then directory for image and generated previews cannot be deleted. File 'fileType' contains only text 'jpg' and is not used. When deleting many products, it will be better.
Type? improvement
Category? CO
BC breaks? no
Deprecations? no
Fixed ticket? Fix #10210
How to test? When deleting image (for product, manufacturer, etc.) in /img/p/... directory is deleted all images, helper files and directory itself.

This change is Reviewable

@PierreRambaud

This comment has been minimized.

Copy link
Contributor

PierreRambaud commented Jul 11, 2019

Hey, I know we are a little bit late, but are you able to rebase your PR? 🙄

@marekhanus marekhanus force-pushed the marekhanus:feature/rm-image-filetype branch from a462702 to be6b2d1 Jul 12, 2019
@marekhanus marekhanus requested a review from PrestaShop/prestashop-core-developers as a code owner Jul 12, 2019
@marekhanus marekhanus force-pushed the marekhanus:feature/rm-image-filetype branch from be6b2d1 to 2e6c10f Jul 12, 2019
@marekhanus

This comment has been minimized.

Copy link
Contributor Author

marekhanus commented Jul 12, 2019

@PierreRambaud rebased :)

@PierreRambaud

This comment has been minimized.

Copy link
Contributor

PierreRambaud commented Jul 12, 2019

Weird because of broken PrettyCI :/

@marekhanus marekhanus force-pushed the marekhanus:feature/rm-image-filetype branch 2 times, most recently from f8431d1 to 56c22f8 Jul 12, 2019
@marekhanus marekhanus force-pushed the marekhanus:feature/rm-image-filetype branch from 56c22f8 to b46b945 Jul 12, 2019
@marekhanus

This comment has been minimized.

Copy link
Contributor Author

marekhanus commented Jul 12, 2019

@PierreRambaud fixed :)

@sarahdib sarahdib self-assigned this Jul 15, 2019
@sarahdib

This comment has been minimized.

Copy link

sarahdib commented Jul 15, 2019

Hello @marekhanus

Thank you for your contribution. Can you provide me the step to test your PR ?

Thank you :)

@marionf

This comment has been minimized.

Copy link
Contributor

marionf commented Oct 22, 2019

Hello @marekhanus

Since we have not had answer for more than 30 days, I close this PR.
Please before submitting a PR, open an issue to describe the issue and how to reproduce it
It will help us to test the PR after

@marionf marionf closed this Oct 22, 2019
@jtraulle

This comment has been minimized.

Copy link

jtraulle commented Jan 9, 2020

This PR is related to #10210 issue. Can anyone from the prestashop team add this in the Fixed ticket? line of the table of this PR ?

@marionf Please, reopen this 🙂

@sarahdib Step to test is pretty simple. Create a product, add an image to the product. Get the id of the image associated to the product and then delete the image. Check that the directory containing the images/thumbs is removed after removing the image.

For example, if the image have the ID 12070, pictures/thumbnail etc. will be located in img/p/1/2/0/7/0.

Without this fix, when the image 12070 is deleted, all pictures/thumbnail from img/p/1/2/0/7/0 directory is removed but the file fileType persists and empty folder img/p/1/2/0/7/0 is not removed because ... well ... it is not really empty because of the remaining file fileType.

@marionf marionf reopened this Jan 9, 2020
@sarahdib sarahdib added QA ✔️ and removed waiting for QA labels Jan 10, 2020
@sarahdib sarahdib added this to the 1.7.7.0 milestone Jan 10, 2020
@Progi1984 Progi1984 merged commit 25cbee3 into PrestaShop:develop Jan 10, 2020
3 checks passed
3 checks passed
PrettyCI Code formatting
Details
Travis CI - Pull Request Build Passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Progi1984

This comment has been minimized.

Copy link
Contributor

Progi1984 commented Jan 10, 2020

Thanks @marekhanus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.