(mu_scheme_autodetect_p): Return true if scheme is the name of an existing file or directory.
Showing
1 changed file
with
3 additions
and
1 deletions
... | @@ -1228,7 +1228,9 @@ mu_scheme_autodetect_p (const char *scheme, const char **path) | ... | @@ -1228,7 +1228,9 @@ mu_scheme_autodetect_p (const char *scheme, const char **path) |
1228 | *path += MU_FILE_SCHEME_LEN; | 1228 | *path += MU_FILE_SCHEME_LEN; |
1229 | return 1; | 1229 | return 1; |
1230 | } | 1230 | } |
1231 | if (strncmp (MU_PATH_SCHEME, scheme, MU_PATH_SCHEME_LEN) == 0) | 1231 | if (access (scheme, F_OK) == 0 |
1232 | /* FIXME: this can return true even if the folder is unreadable */ | ||
1233 | || strncmp (MU_PATH_SCHEME, scheme, MU_PATH_SCHEME_LEN) == 0) | ||
1232 | return 1; | 1234 | return 1; |
1233 | return 0; | 1235 | return 0; |
1234 | } | 1236 | } | ... | ... |
-
Please register or sign in to post a comment