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

Do not add SharedMount if it is invalid #1013

Merged
merged 1 commit into from
Aug 23, 2016

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Aug 22, 2016

If a shared file is moved to the trash the share entry is still alive.
However the sharee can't initialise the share since it is not in the
owners dir /files.

So check if it is there and if not log a debug and carry on.

Fixes #938

@icewind1991 This is safe right (we do it later in the code otherwise anyways that is where the error comes from). But this will not trigger depenency setup right?

CC: @LukasReschke @nickvergessen @MorrisJobke @blizzz

@mention-bot
Copy link

@rullzer, thanks for your PR! By analyzing the annotation information on this pull request, we identified @icewind1991, @PVince81 and @schiessle to be potential reviewers

@rullzer
Copy link
Member Author

rullzer commented Aug 22, 2016

Nope I was to quick...

@rullzer rullzer added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Aug 22, 2016
@rullzer
Copy link
Member Author

rullzer commented Aug 22, 2016

@icewind1991 maybe you have a 'somewhat' clean solution. Basically it fails in https://github.com/nextcloud/server/blob/master/apps/files_sharing/lib/sharedstorage.php#L87 because the file is in the trash (so not in <user>/files).

@rullzer rullzer assigned rullzer and icewind1991 and unassigned rullzer Aug 22, 2016
$ownerView = new View('/' . $this->superShare->getShareOwner() . '/files');
$arguments['ownerView'] = $ownerView;

// Check if the fileid is in the owners home (and not in the trash) see #938
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer full link to avoid problems with numbers of another project

Since this exception can be thrown when a shared file is in the
trashbin there is no need to spam the log like crazy.

Fixes #938
@rullzer rullzer changed the base branch from master to shared-storage-non-recursive August 23, 2016 17:16
@rullzer
Copy link
Member Author

rullzer commented Aug 23, 2016

Rebased on @icewind1991 branch. Lets see what CI tells us.

@rullzer rullzer added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Aug 23, 2016
@derkostka
Copy link
Contributor

Maybe also fixes #710

@derkostka
Copy link
Contributor

👍 works as expected. Changes look good.

@LukasReschke
Copy link
Member

Seems to do 👍

@MorrisJobke
Copy link
Member

@rullzer Could you create the backport PR?

@rullzer
Copy link
Member Author

rullzer commented Aug 30, 2016

Ah yes forgot. will do

@rullzer
Copy link
Member Author

rullzer commented Aug 30, 2016

Ah no I did #1029

@MorrisJobke
Copy link
Member

Ah no I did #1029

Ah got it ... it was merged into a different branch and not into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants