Skip to content

[WIP] Auto-delete tag mappings when files deleted or unshare from self - #13284

Closed
PVince81 wants to merge 1 commit into
masterfrom
tag-autodelete
Closed

PVince81 wants to merge 1 commit into
masterfrom
tag-autodelete

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

Automatically delete the tag mappings of files that are about to be
deleted either by a delete operation or "unshare from self".

Partial fix for: #12858

Note: this doesn't fix the case when shared files are deleted by another user.

I don't like this fix because:

  1. it introduces more static code
  2. need to iterate over all subfolders to delete tag to file mappings by file id. This means that file deletion will be even slower than before. (the preview code already iterates in a similar manner)

For 1) I thought maybe about moving "TagService" from the files app to core.
Or core should have a "FileTagManager" that provides such utilities.

What do you think ?

@Raydiation @DeepDiver1975 @icewind1991 @LukasReschke @schiesbn

  • add unit tests

Automatically delete the tag mappings of files that are about to be
deleted either by a delete operation or "unshare from self".
@ghost

ghost commented Jan 12, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/6440/
👍 Test PASSed. 👍

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 9 new issues, 5 updated code elements

@PVince81

Copy link
Copy Markdown
Contributor Author

Closing. We should look into doing this in a background job instead, because the approach in this PR can cause performance issues.

@PVince81 PVince81 closed this Mar 18, 2015
@PVince81
PVince81 deleted the tag-autodelete branch March 18, 2015 10:10
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants