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

[5.7.5.9][V8] File Versions doesn't delete unapproved version files physically #4465

Closed
katzueno opened this issue Oct 5, 2016 · 3 comments

Comments

@katzueno
Copy link
Contributor

katzueno commented Oct 5, 2016

Confirmed with both 5.7.5.9 and Version 8.0b6.

Steps to reproduce

  • Visit File Manager
  • Click one of the existing file
  • Click Replace
  • Choose and upload a file to replace the file
  • Click that file and select Properties
  • Click Version tabs
  • Delete the older version of the file
    delete_unapproved_version
  • The older version of file still physically existed under /application/files
    delete_unapproved_version_finder

I had to go through the site with a lots of file's older versions deleted.. but still eating up the disk spaces of the server...

Deleted file version should be deleted.

Thanks

@aembler
Copy link
Member

aembler commented Oct 6, 2016

This is the intended behavior; from the comments of the Version::delete() method:

Removes a version of a file. Note, does NOT remove the file because we don't know where the file might elsewhere be used/referenced.

The method takes as boolean parameter to delete the physical files, which is what we do when we remove the entire File object. I assume this is because we didn't easily know if the version object was actually a completely new file or just a text change (if it's a text change, when deleting the file version we obviously don't want to remove the file.)

@aembler
Copy link
Member

aembler commented Aug 2, 2018

This is fixed in 8.4.2 #6887

@aembler aembler closed this as completed Aug 2, 2018
@katzueno
Copy link
Contributor Author

Just read the release note. Thank you @mlocati !

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

No branches or pull requests

2 participants