admin_url() do not retrieve the correct url in an subdirectory install

I solved my problem by trying this (and it works!):

function get_some_url() {
    $full_url = add_query_arg( 'action', 'action-name', admin_url( 'users.php' ) );
    //$relative_url = str_replace( get_site_url(), '', $full_url );
    //return $relative_url;
    return $full_url;
}

This was tested in a localhost/subdirectory install and in a live install (not subdirectory). Now the URL is retrieved correctly.

tech