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() {
15351535 }
15361536}
15371537
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.
15381541#[ test]
15391542#[ cfg( windows) ]
15401543fn 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" ;
15441545
1545- fs:: metadata ( & hiberfil) . unwrap ( ) ;
1546- fs:: symlink_metadata ( & hiberfil) . unwrap ( ) ;
1546+ fs:: metadata ( hiberfil) . unwrap ( ) ;
1547+ fs:: symlink_metadata ( hiberfil) . unwrap ( ) ;
15471548}
You can’t perform that action at this time.
0 commit comments