@@ -2462,27 +2462,26 @@ ErrorOr<Status> RedirectingFileSystem::status(const Twine &OriginalPath) {
2462
2462
}
2463
2463
2464
2464
bool RedirectingFileSystem::exists (const Twine &OriginalPath) {
2465
- SmallString<256 > CanonicalPath ;
2466
- OriginalPath.toVector (CanonicalPath );
2465
+ SmallString<256 > Path ;
2466
+ OriginalPath.toVector (Path );
2467
2467
2468
- if (makeCanonical (CanonicalPath ))
2468
+ if (makeAbsolute (Path ))
2469
2469
return false ;
2470
2470
2471
2471
if (Redirection == RedirectKind::Fallback) {
2472
2472
// Attempt to find the original file first, only falling back to the
2473
2473
// mapped file if that fails.
2474
- if (ExternalFS->exists (CanonicalPath ))
2474
+ if (ExternalFS->exists (Path ))
2475
2475
return true ;
2476
2476
}
2477
2477
2478
- ErrorOr<RedirectingFileSystem::LookupResult> Result =
2479
- lookupPath (CanonicalPath);
2478
+ ErrorOr<RedirectingFileSystem::LookupResult> Result = lookupPath (Path);
2480
2479
if (!Result) {
2481
2480
// Was not able to map file, fallthrough to using the original path if
2482
2481
// that was the specified redirection type.
2483
2482
if (Redirection == RedirectKind::Fallthrough &&
2484
2483
isFileNotFound (Result.getError ()))
2485
- return ExternalFS->exists (CanonicalPath );
2484
+ return ExternalFS->exists (Path );
2486
2485
return false ;
2487
2486
}
2488
2487
@@ -2492,18 +2491,18 @@ bool RedirectingFileSystem::exists(const Twine &OriginalPath) {
2492
2491
return true ;
2493
2492
}
2494
2493
2495
- SmallString<256 > CanonicalRemappedPath ((*ExtRedirect).str ());
2496
- if (makeCanonical (CanonicalRemappedPath ))
2494
+ SmallString<256 > RemappedPath ((*ExtRedirect).str ());
2495
+ if (makeAbsolute (RemappedPath ))
2497
2496
return false ;
2498
2497
2499
- if (ExternalFS->exists (CanonicalRemappedPath ))
2498
+ if (ExternalFS->exists (RemappedPath ))
2500
2499
return true ;
2501
2500
2502
2501
if (Redirection == RedirectKind::Fallthrough) {
2503
2502
// Mapped the file but it wasn't found in the underlying filesystem,
2504
2503
// fallthrough to using the original path if that was the specified
2505
2504
// redirection type.
2506
- return ExternalFS->exists (CanonicalPath );
2505
+ return ExternalFS->exists (Path );
2507
2506
}
2508
2507
2509
2508
return false ;
0 commit comments