File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -672,7 +672,8 @@ impl GlobalContext {
672672                        . to_string( ) , 
673673                ) , 
674674                ( "{workspace-path-hash}" ,  { 
675-                     let  hash = crate :: util:: hex:: short_hash( & workspace_manifest_path) ; 
675+                     let  real_path = std:: fs:: canonicalize( workspace_manifest_path) ?; 
676+                     let  hash = crate :: util:: hex:: short_hash( & real_path) ; 
676677                    format!( "{}{}{}" ,  & hash[ 0 ..2 ] ,  std:: path:: MAIN_SEPARATOR ,  & hash[ 2 ..] ) 
677678                } ) , 
678679            ] ; 
Original file line number Diff line number Diff line change @@ -674,13 +674,8 @@ fn template_workspace_path_hash_should_handle_symlink() {
674674    let  symlink_hash_dir = parse_workspace_manifest_path_hash ( & foo_dir) ; 
675675    verify_layouts ( & p,  & symlink_hash_dir) ; 
676676
677-     // Verify the current behavior: 
678-     // unix: hash dir created from the symlinked and non-symlinked dirs are the same. 
679-     #[ cfg( unix) ]  
677+     // Verify the hash dir created from the symlinked and non-symlinked dirs are the same. 
680678    assert_eq ! ( original_hash_dir,  symlink_hash_dir) ; 
681-     // windows: hash dir created from the symlinked and non-symlinked dirs are different. 
682-     #[ cfg( windows) ]  
683-     assert_ne ! ( original_hash_dir,  symlink_hash_dir) ; 
684679
685680    fn  verify_layouts ( p :  & Project ,  build_dir_parent :  & PathBuf )  { 
686681        let  build_dir = build_dir_parent. as_path ( ) . join ( "build-dir" ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments