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

Shares counter is not decresed when shared directory/file is deleted #32

Open
GillesMocellin opened this issue Apr 7, 2020 · 3 comments

Comments

@GillesMocellin
Copy link

Nextcloud 17.0.5 via fpm Docker image.

I have some user with high number of shares, but we cannot see them.
After some test I see that i we delete a directory or file that is shared, the sahre counter does not change.
If we remove the share before deleteing the folder/file, then it is decreased.

Perhaps it's a bug in Nextcloud itself...

@nickvergessen
Copy link
Member

Well the app counts the shares in the database. So when the item is still in the trashbin the shares are still counted I guess.

@GillesMocellin
Copy link
Author

I thought that but I tried to delete all files/folders in my trash. The share is still their in the database, and no way to remove it.
If I restore a folder that was shared, I can remove the share then delete again the folder, end the share is no more counted (no more present in the database).

But I consider a bug that the statistics take account of deleted shares. Perhaps a flag (deleted) in the oc_share table can help handle these cases ? Don't count delete ones but allow it to be restored.

@nickvergessen
Copy link
Member

I guess it will happen with some cleanup in a background job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants