remove some unneeded normalizePath calls#41116
Closed
icewind1991 wants to merge 1 commit intomasterfrom
Closed
Conversation
Altahrim
approved these changes
Oct 26, 2023
662ae14 to
9301120
Compare
Merged
e4120e2 to
4f2abbd
Compare
Signed-off-by: Robin Appelman <[email protected]>
4f2abbd to
8f7f696
Compare
Merged
juliusknorr
reviewed
Nov 16, 2023
| throw new \OCP\Files\NotFoundException(); | ||
| } | ||
| $fullPath = Filesystem::normalizePath($view->getAbsolutePath($path)); | ||
| $fullPath = rtrim($view->getAbsolutePath($path), '/'); |
Member
There was a problem hiding this comment.
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
juliusknorr
reviewed
Nov 16, 2023
Member
juliusknorr
left a comment
There was a problem hiding this comment.
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.
This was referenced Mar 12, 2024
Merged
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While normalizing isn't that expensive, it does add up if we do it multiple times for every item in a folder