pub fn got_symlink_permission(tmpdir: &TempDir) -> bool {
    if cfg!(unix) {
        return true;
    }
    let link = "some_hopefully_unique_link_name";

    match symlink_file(r"nonexisting_target", tmpdir, link) {
        Ok(_) => true,
        // ERROR_PRIVILEGE_NOT_HELD = 1314
        Err(ref err) if err.raw_os_error() == Some(1314) => false,
        Err(_) => true,
    }
}
// Several test fail on windows if the user does not have permission to
// create symlinks (the `SeCreateSymbolicLinkPrivilege`). Instead of
// disabling these test on Windows, use this function to test whether we
// have permission, and return otherwise. This way, we still don't run these
// tests most of the time, but at least we do if the user has the right
// permissions.
Several test fail on windows if the user does not have permission to
create symlinks (the `SeCreateSymbolicLinkPrivilege`). Instead of
disabling these test on Windows, use this function to test whether we
have permission, and return otherwise. This way, we still don't run these
tests most of the time, but at least we do if the user has the right
permissions.
Several test fail on windows if the user does not have permission to create symlinks ( the ` SeCreateSymbolicLinkPrivilege ` ) . Instead of disabling these test on Windows use this function to test whether we have permission and return otherwise . This way we still don ' t run these tests most of the time but at least we do if the user has the right permissions .
pub fn got_symlink_permission(tmpdir: &TempDir) -> bool {
    if cfg!(unix) {
        return true;
    }
    let link = "some_hopefully_unique_link_name";
    match symlink_file(r"nonexisting_target", tmpdir, link) {
        Ok(_) => true,
        // ERROR_PRIVILEGE_NOT_HELD = 1314
        Err(ref err) if err.raw_os_error() == Some(1314) => false,
        Err(_) => true,
    }
}
pub fn got_symlink_permission ( tmpdir : & TempDir ) -> bool { if cfg ! ( unix ) { return true ; } let link = " " ; match symlink_file ( r"nonexisting_target" , tmpdir , link ) { Ok ( _ ) => true , // ERROR_PRIVILEGE_NOT_HELD = 1314 Err ( ref err ) if err . raw_os_error ( ) == Some ( 1314 ) => false , Err ( _ ) => true , } }
Several test fail on windows if the user does not have permission to
create symlinks (the `SeCreateSymbolicLinkPrivilege`).
Several test fail on windows if the user does not have permission to create symlinks ( the ` SeCreateSymbolicLinkPrivilege ` ) .
tmpdir
&TempDir
tmpdir
&TempDir