@@ -187,20 +187,18 @@ FileSystemManager::FileSystemManager()
187187fs::Folder& FileSystemManager::get_folder (ManifestLocation location) noexcept { return folders.at (location); }
188188fs::Folder const & FileSystemManager::get_folder (ManifestLocation location) const noexcept { return folders.at (location); }
189189
190- Folder* FileSystemManager::get_folder_for_given_path (std::filesystem::path const & given_path) noexcept {
191- auto normalized_path = given_path.lexically_normal ();
190+ Folder* FileSystemManager::get_folder_for_given_path (std::string_view given_path) noexcept {
192191 for (auto const & [manifest_location, folder] : folders) {
193- if (folder.location () == normalized_path ) {
192+ if (folder.location () == given_path ) {
194193 return &folders.at (manifest_location);
195194 }
196195 }
197- if (redirected_paths.count (given_path.string ()) > 0 ) {
198- return &folders.at (redirected_paths.at (normalized_path.string ()));
199- }
200- for (auto const & [redirected_path_str, redirected_location] : redirected_paths) {
201- std::filesystem::path redirected_path = redirected_path_str;
196+ for (auto const & [redirected_path, redirected_location] : redirected_paths) {
197+ if (redirected_path == given_path) {
198+ return &folders.at (redirected_location);
199+ }
202200 const auto mismatch_pair =
203- std::mismatch (normalized_path .begin (), normalized_path .end (), redirected_path.begin (), redirected_path.end ());
201+ std::mismatch (given_path .begin (), given_path .end (), redirected_path.begin (), redirected_path.end ());
204202 if (mismatch_pair.second == redirected_path.end ()) return &folders.at (redirected_location);
205203 }
206204 return nullptr ;
0 commit comments