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

normalize root before setting it in FilesView #24329

Closed
wants to merge 1 commit into from
Closed

Conversation

georgehrke
Copy link
Contributor

fixes #21173

please test @PVince81 @oparoz

@georgehrke
Copy link
Contributor Author

also cc @tigermick @davivel

@nickvergessen
Copy link
Contributor

Also @icewind1991

@oparoz
Copy link
Contributor

oparoz commented Apr 29, 2016

Looking at how the tests fail I'm guessing this isn't going to be that simple :(

@PVince81
Copy link
Contributor

Yeah, that is dangerous territory... especially due to the unlogical and inconsistent way how the View is used.

@georgehrke
Copy link
Contributor Author

In my case $root was /admin// and the two slashes caused the bug.

@PVince81
Copy link
Contributor

So far I'd suggest putting on gloves and only fixing the problem in the calling code only, remove the duplicate slash if needed.

@tigermick
Copy link

@PVince81 @oparoz @georgehrke it's working for me ! My problem about thumbnails in external local storage in owncloud app is solved !
Thank you very much !

@georgehrke
Copy link
Contributor Author

I'm not sure if fixing only the external storage when using the thumbnail API is the best approach here.
The problem comes down to this function:
mountpoint php - owncloud - -development-projects-owncloud intellij idea today at 1 39 36 pm
https://github.com/owncloud/core/blob/ed7e009e056cb46b67aba8827efb5fdb3961de1c/lib/private/Files/Mount/MountPoint.php#L190L198

$path has too many slashes, therefore strlen($this->mountPoint) won't work properly.

cc @icewind1991

@PVince81
Copy link
Contributor

PVince81 commented May 9, 2016

Too bad we don't have a "comparePath" function...

@georgehrke
Copy link
Contributor Author

What about normalizing both $path and $this->mountPoint?

@PVince81
Copy link
Contributor

or use some ltrim($path, '/') magic before concat, if that's even possible

@icewind1991
Copy link
Contributor

Would probably be sense to normalize the incoming path in getInternalPath iirc, the mountpoint is already normalized

@georgehrke
Copy link
Contributor Author

okay, will try it :)

@lock
Copy link

lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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

Owncloud Android App can't see Thumbnails of images located on some external storage in 8.2.1- 8.2.2 - 9.0.0
6 participants