-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
remove some unneeded normalizePath calls #41116
Conversation
662ae14
to
9301120
Compare
e4120e2
to
4f2abbd
Compare
Signed-off-by: Robin Appelman <robin@icewind.nl>
4f2abbd
to
8f7f696
Compare
@@ -491,7 +491,7 @@ public static function getStorageInfo($path, $rootInfo = null, $includeMountPoin | |||
if (!$view) { | |||
throw new \OCP\Files\NotFoundException(); | |||
} | |||
$fullPath = Filesystem::normalizePath($view->getAbsolutePath($path)); | |||
$fullPath = rtrim($view->getAbsolutePath($path), '/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure if we should skip the normalization here as $path
might get passed from public API and is used as a cache key which could trigger the uncached calculation then more often
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm uncomfortable getting this merged in a draft state as I cannot tell about any potentially leftovers and the change itself feels a bit risky to do as I fear there might be side effects whenever a non-normalized path is used in other code parts.
While normalizing isn't that expensive, it does add up if we do it multiple times for every item in a folder