Skip to content

Use the correct mountpoint to calculate - #21489

Merged
nickvergessen merged 5 commits into
masterfrom
fix/share/use_correct_mount
Jul 9, 2020
Merged

Use the correct mountpoint to calculate#21489
nickvergessen merged 5 commits into
masterfrom
fix/share/use_correct_mount

Conversation

@rullzer

Copy link
Copy Markdown
Member

If we use the owners mount point this results in null. And then the rest
of the checks get called with null. Which doesn't work.

Signed-off-by: Roeland Jago Douma roeland@famdouma.nl

@rullzerrullzer added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jun 23, 2020

@danxuliudanxuliu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment threadlib/private/Share20/Manager.php Outdated
$userMountPoint = array_shift($userMountPoints);

if ($userMountPoint === null) {
throw new \Exception('Could not get proper user mount for ' . $userMountPointId . '. Failing since else the next calls are called with null');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be a GenericShareException, or it should be documented that generalCreateChecks can throw a plain Exception too.

@nickvergessen

Copy link
Copy Markdown
Member

Looking into the tests now

@nickvergessen

Copy link
Copy Markdown
Member

Tried my best but this is so … up.
The tests are creating Local storages and initialising the view on them, without going through any layers, so of course when we check the database later on for related storages/mount points the list is empty and therefor the share fails.

@rullzer
rullzerforce-pushed the fix/share/use_correct_mount branch from 071603f to 25c4591CompareJuly 9, 2020 07:01

@nickvergessennickvergessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🦈 Time to fix up

rullzerand others added 5 commits July 9, 2020 11:14
If we use the owners mount point this results in null. And then the rest
of the checks get called with null. Which doesn't work.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
@rullzer
rullzerforce-pushed the fix/share/use_correct_mount branch from 25c4591 to 118965aCompareJuly 9, 2020 09:15
@nickvergessen
nickvergessen merged commit 183e2ef into masterJul 9, 2020
@nickvergessen
nickvergessen deleted the fix/share/use_correct_mount branch July 9, 2020 10:57
@nickvergessen

Copy link
Copy Markdown
Member

Backports I guess @rullzer

@rullzer

Copy link
Copy Markdown
MemberAuthor

Yes

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable19

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable18

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable17

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsfeature: sharing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@rullzer@nickvergessen@ChristophWurst@danxuliu@icewind1991