File tree 1 file changed +5
-11
lines changed
1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -913,19 +913,13 @@ fn read_link() {
913
913
// junction
914
914
assert_eq ! ( check!( fs:: read_link( r"C:\Users\Default User" ) ) , Path :: new( r"C:\Users\Default" ) ) ;
915
915
// junction with special permissions
916
- match env:: var ( environment_variable) {
917
- Ok ( _var) => assert_eq ! (
916
+ // Since not all localized windows versions contain the folder "Documents and settings" in english,
917
+ // we will briefly check, if it exists and otherwise skip the test. Except durin CI we will always execute the test.
918
+ if Path :: new ( r"C:\Documents and settings\" ) . exists ( ) || env:: var_os ( "CI" ) . is_some ( ) {
919
+ assert_eq ! (
918
920
check!( fs:: read_link( r"C:\Documents and settings\" ) ) ,
919
921
Path :: new( r"C:\Users" )
920
- ) ,
921
- Err ( _e) => {
922
- if Path :: new ( r"C:\Documents and settings\" ) . exists ( ) {
923
- assert_eq ! (
924
- check!( fs:: read_link( r"C:\Documents and settings\" ) ) ,
925
- Path :: new( r"C:\Users" )
926
- )
927
- }
928
- }
922
+ ) ;
929
923
}
930
924
}
931
925
let tmpdir = tmpdir ( ) ;
You can’t perform that action at this time.
0 commit comments