This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
ScopeManager is inconsistent about path endings #5529
Open
Description
Some parts of ScopeManager require paths to be canonical (ending in "/") -- they concatenate dir names directly to the path, and the code will go into an infinite traversal directory if it receives a path with no trailing "/" (as we learned on the filesystem branch).
Other parts of ScopeManager requires paths to be non-canonical (no trailing "/" at end) -- the code is likely to break if it uses a path with trailing "/" instead. See the two calls to FileUtils.canonicalizeFolderPath() (or stripTrailingSlash(), once #5527 lands), and possibly also three instances of the code dir + "/"
.
We should clean up ScopeManager so it makes more consistent assumptions about what paths look like.