File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1535,13 +1535,14 @@ fn read_large_dir() {
1535
1535
}
1536
1536
}
1537
1537
1538
+ /// Test the fallback for getting the metadata of files like hiberfil.sys that
1539
+ /// Windows holds a special lock on, preventing normal means of querying
1540
+ /// metadata. See #96980.
1538
1541
#[ test]
1539
1542
#[ cfg( windows) ]
1540
1543
fn hiberfil_sys ( ) {
1541
- // Get the system drive, which is usually `C:`.
1542
- let mut hiberfil = crate :: env:: var ( "SystemDrive" ) . unwrap ( ) ;
1543
- hiberfil. push_str ( r"\hiberfil.sys" ) ;
1544
+ let hiberfil = r"C:\hiberfil.sys" ;
1544
1545
1545
- fs:: metadata ( & hiberfil) . unwrap ( ) ;
1546
- fs:: symlink_metadata ( & hiberfil) . unwrap ( ) ;
1546
+ fs:: metadata ( hiberfil) . unwrap ( ) ;
1547
+ fs:: symlink_metadata ( hiberfil) . unwrap ( ) ;
1547
1548
}
You can’t perform that action at this time.
0 commit comments