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

When uploading a new logo for third party, old logo files are not deleted from disk #21518

Closed
bos4711 opened this issue Jul 17, 2022 · 1 comment
Labels
Bug This is a bug (something does not work as expected)

Comments

@bos4711
Copy link
Contributor

bos4711 commented Jul 17, 2022

Bug

Dolibarr 15.0

File system for a third party before uploading new logo:

./documents/societe/711/logos/logo-ab-horizontal.png
./documents/societe/711/logos/thumbs/logo-ab-horizontal_small.png
./documents/societe/711/logos/thumbs/logo-ab-horizontal_mini.png

Then we upload a new logo named "logo-ab-horizontal2.png" to the same third party:

./documents/societe/711/logos/logo-ab-horizontal.png
./documents/societe/711/logos/thumbs/logo-ab-horizontal_small.png
./documents/societe/711/logos/thumbs/logo-ab-horizontal_mini.png
./documents/societe/711/logos/thumbs/logo-ab-horizontal2_small.png
./documents/societe/711/logos/thumbs/logo-ab-horizontal2_mini.png
./documents/societe/711/logos/logo-ab-horizontal2.png

Now both logo files exist on disk while only one of them is in use, making the old logo orphaned and waste disk space for no reason.

Environment Version

15.0.0

Environment OS

Linux 5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Environment Web server

No response

Environment PHP

7.4.30

Environment Database

No response

Environment URL(s)

No response

Expected and actual behavior

Expected behaviour is that when uploading a new logo, Dolibarr should delete all references (including disk files) to the old logo.

Steps to reproduce the behavior

No response

Attached files

No response

@bos4711 bos4711 added the Bug This is a bug (something does not work as expected) label Jul 17, 2022
@emheyarssi
Copy link
Contributor

Bug or feature? 😁

eldy added a commit that referenced this issue Jul 24, 2022
@eldy eldy closed this as completed in d8dfe36 Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

2 participants