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