Skip to content

Update parent when moving share into recieved share - #20989

Merged
DeepDiver1975 merged 1 commit into
masterfrom
fix_20769
Dec 9, 2015
Merged

DeepDiver1975 merged 1 commit into
masterfrom
fix_20769

Conversation

@rullzer

@rullzer rullzer commented Dec 7, 2015

Copy link
Copy Markdown
Contributor

Fixes #20769

When I receive a share and move a share of myself into that share (which
is allowed currently) I effectively hand over ownership of the files I
move. So we need to update the share I move to have as a parent the
share I move it into. Else our mounting system gets confused.

No unit tests here since well. It is hell to write them for this code :( But we have an integration tests PR ready for exactly this case: #20893

Lets see if we don't break anything else.

@rullzer rullzer added this to the 9.0-current milestone Dec 7, 2015
@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @schiesbn, @PVince81 and @owncloud-bot to be potential reviewers

Comment thread apps/files_sharing/lib/updater.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to do it in a post hook ? What if the rename failed ?

Usually what we did is gather the relevant info in a pre hook, store it in a local (static 😱) variable and then do the operation in the post hook

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aaah mmm yes makes sense... lets see what breaks if I do that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@rullzer

rullzer commented Dec 7, 2015

Copy link
Copy Markdown
Contributor Author

I rebased the test PR on this in #20893 where the OCS integration tests pass!

Comment thread apps/files_sharing/lib/updater.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/his/their/ :wink:

@PVince81

PVince81 commented Dec 7, 2015

Copy link
Copy Markdown
Contributor

Tested, works 👍

@PVince81

PVince81 commented Dec 7, 2015

Copy link
Copy Markdown
Contributor

@schiesbn can you have a look at this ? Tricky stuff

@rullzer
rullzer force-pushed the fix_20769 branch 2 times, most recently from 81326b7 to d38949f Compare December 7, 2015 15:28
Fixes #20769

When I receive a share and move a share of myself into that share (which
is allowed currently) I effectively hand over ownership of the files I
move. So we need to update the share I move to have as a parent the
share I move it into. Else our mounting system gets confused.
@schiessle

Copy link
Copy Markdown
Contributor

makes sense & code looks good 👍

@rullzer

rullzer commented Dec 9, 2015

Copy link
Copy Markdown
Contributor Author

@karlitschek backport to 8.2 (maybe even 8.1 and 8.0)?

DeepDiver1975 added a commit that referenced this pull request Dec 9, 2015
Update parent when moving share into recieved share
@DeepDiver1975
DeepDiver1975 merged commit 54dbe5b into master Dec 9, 2015
@DeepDiver1975
DeepDiver1975 deleted the fix_20769 branch December 9, 2015 12:07
@karlitschek

Copy link
Copy Markdown
Contributor

please backport to 8.2 8.1 and 8.0

@rullzer

rullzer commented Dec 10, 2015

Copy link
Copy Markdown
Contributor Author

stable8: #21103
stable8.1: #21102
stable8.2: #21101

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 8, 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.

Empty etag after moving shared file into a commonly received share

7 participants