@@ -1387,7 +1387,7 @@ impl FileSystemPath {
1387
1387
// is invalid.
1388
1388
pub async fn realpath ( & self ) -> Result < FileSystemPath > {
1389
1389
let result = & ( * self . realpath_with_links ( ) . await ?) ;
1390
- match & result. path_or_error {
1390
+ match & result. path_result {
1391
1391
Ok ( path) => Ok ( path. clone ( ) ) ,
1392
1392
Err ( error) => Err ( anyhow:: anyhow!( error. as_error_message( self , result) ) ) ,
1393
1393
}
@@ -1449,7 +1449,7 @@ impl ValueToString for FileSystemPath {
1449
1449
#[ derive( Clone , Debug ) ]
1450
1450
#[ turbo_tasks:: value( shared) ]
1451
1451
pub struct RealPathResult {
1452
- pub path_or_error : Result < FileSystemPath , RealPathResultError > ,
1452
+ pub path_result : Result < FileSystemPath , RealPathResultError > ,
1453
1453
pub symlinks : Vec < FileSystemPath > ,
1454
1454
}
1455
1455
@@ -2121,7 +2121,7 @@ impl DirectoryEntry {
2121
2121
pub async fn resolve_symlink ( self ) -> Result < Self > {
2122
2122
if let DirectoryEntry :: Symlink ( symlink) = & self {
2123
2123
let result = & * symlink. realpath_with_links ( ) . await ?;
2124
- let real_path = match & result. path_or_error {
2124
+ let real_path = match & result. path_result {
2125
2125
Ok ( path) => path,
2126
2126
Err ( error) => {
2127
2127
return Ok ( DirectoryEntry :: Error (
@@ -2136,9 +2136,9 @@ impl DirectoryEntry {
2136
2136
FileSystemEntryType :: NotFound => DirectoryEntry :: Error (
2137
2137
format ! ( "Symlink {symlink} points at {real_path} which does not exist" ) . into ( ) ,
2138
2138
) ,
2139
+ // This is caused by eventual consistency
2139
2140
FileSystemEntryType :: Symlink => bail ! (
2140
- "Symlink {symlink} points at a symlink but realpath_with_links returned a \
2141
- path, this is caused by eventual consistency."
2141
+ "Symlink {symlink} points at a symlink but realpath_with_links returned a path"
2142
2142
) ,
2143
2143
_ => self ,
2144
2144
} )
@@ -2376,7 +2376,7 @@ async fn realpath_with_links(path: FileSystemPath) -> Result<Vc<RealPathResult>>
2376
2376
if current_path. is_root ( ) {
2377
2377
// fast path
2378
2378
return Ok ( RealPathResult {
2379
- path_or_error : Ok ( current_path) ,
2379
+ path_result : Ok ( current_path) ,
2380
2380
symlinks : symlinks. into_iter ( ) . collect ( ) ,
2381
2381
}
2382
2382
. cell ( ) ) ;
@@ -2395,7 +2395,7 @@ async fn realpath_with_links(path: FileSystemPath) -> Result<Vc<RealPathResult>>
2395
2395
. rsplit_once ( '/' )
2396
2396
. map_or ( current_path. path . as_str ( ) , |( _, name) | name) ;
2397
2397
symlinks. extend ( parent_result. symlinks ) ;
2398
- let parent_path = match parent_result. path_or_error {
2398
+ let parent_path = match parent_result. path_result {
2399
2399
Ok ( path) => {
2400
2400
if path != parent {
2401
2401
current_path = path. join ( basename) ?;
@@ -2415,7 +2415,7 @@ async fn realpath_with_links(path: FileSystemPath) -> Result<Vc<RealPathResult>>
2415
2415
FileSystemEntryType :: Symlink
2416
2416
) {
2417
2417
return Ok ( RealPathResult {
2418
- path_or_error : Ok ( current_path) ,
2418
+ path_result : Ok ( current_path) ,
2419
2419
symlinks : symlinks. into_iter ( ) . collect ( ) , // convert set to vec
2420
2420
}
2421
2421
. cell ( ) ) ;
@@ -2450,7 +2450,7 @@ async fn realpath_with_links(path: FileSystemPath) -> Result<Vc<RealPathResult>>
2450
2450
// Returning the followed symlinks is still important, even if there is an error! Otherwise
2451
2451
// we may never notice if the symlink loop is fixed.
2452
2452
Ok ( RealPathResult {
2453
- path_or_error : Err ( error) ,
2453
+ path_result : Err ( error) ,
2454
2454
symlinks : symlinks. into_iter ( ) . collect ( ) ,
2455
2455
}
2456
2456
. cell ( ) )
0 commit comments