]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - client_common.c
fd: Remove file_exists().
[paraslash.git] / client_common.c
index 2a6b47d6b2b095daadf05659eafd52abfb218b35..642852ec6b8751454538ac9f3a021970f5cfbdef 100644 (file)
@@ -578,8 +578,9 @@ int client_parse_config(int argc, char *argv[], struct client_task **ct_ptr,
        if (CLIENT_OPT_GIVEN(KEY_FILE, lpr))
                kf = para_strdup(CLIENT_OPT_STRING_VAL(KEY_FILE, lpr));
        else {
+               struct stat statbuf;
                kf = make_message("%s/.paraslash/key.%s", home, user);
-               if (!file_exists(kf)) {
+               if (stat(kf, &statbuf) != 0) { /* assume file does not exist */
                        free(kf);
                        kf = make_message("%s/.ssh/id_rsa", home);
                }