@@ -2461,27 +2461,26 @@ ErrorOr<Status> RedirectingFileSystem::status(const Twine &OriginalPath) {
24612461}
24622462
24632463bool RedirectingFileSystem::exists (const Twine &OriginalPath) {
2464- SmallString<256 > CanonicalPath ;
2465- OriginalPath.toVector (CanonicalPath );
2464+ SmallString<256 > Path ;
2465+ OriginalPath.toVector (Path );
24662466
2467- if (makeCanonical (CanonicalPath ))
2467+ if (makeAbsolute (Path ))
24682468 return false ;
24692469
24702470 if (Redirection == RedirectKind::Fallback) {
24712471 // Attempt to find the original file first, only falling back to the
24722472 // mapped file if that fails.
2473- if (ExternalFS->exists (CanonicalPath ))
2473+ if (ExternalFS->exists (Path ))
24742474 return true ;
24752475 }
24762476
2477- ErrorOr<RedirectingFileSystem::LookupResult> Result =
2478- lookupPath (CanonicalPath);
2477+ ErrorOr<RedirectingFileSystem::LookupResult> Result = lookupPath (Path);
24792478 if (!Result) {
24802479 // Was not able to map file, fallthrough to using the original path if
24812480 // that was the specified redirection type.
24822481 if (Redirection == RedirectKind::Fallthrough &&
24832482 isFileNotFound (Result.getError ()))
2484- return ExternalFS->exists (CanonicalPath );
2483+ return ExternalFS->exists (Path );
24852484 return false ;
24862485 }
24872486
@@ -2491,18 +2490,18 @@ bool RedirectingFileSystem::exists(const Twine &OriginalPath) {
24912490 return true ;
24922491 }
24932492
2494- SmallString<256 > CanonicalRemappedPath ((*ExtRedirect).str ());
2495- if (makeCanonical (CanonicalRemappedPath ))
2493+ SmallString<256 > RemappedPath ((*ExtRedirect).str ());
2494+ if (makeAbsolute (RemappedPath ))
24962495 return false ;
24972496
2498- if (ExternalFS->exists (CanonicalRemappedPath ))
2497+ if (ExternalFS->exists (RemappedPath ))
24992498 return true ;
25002499
25012500 if (Redirection == RedirectKind::Fallthrough) {
25022501 // Mapped the file but it wasn't found in the underlying filesystem,
25032502 // fallthrough to using the original path if that was the specified
25042503 // redirection type.
2505- return ExternalFS->exists (CanonicalPath );
2504+ return ExternalFS->exists (Path );
25062505 }
25072506
25082507 return false ;
0 commit comments