diff options
author | Damien Leone <damien.leone@fensalir.fr> | 2009-05-16 16:20:15 +0200 |
---|---|---|
committer | Damien Leone <damien.leone@fensalir.fr> | 2009-05-16 16:20:15 +0200 |
commit | 43283a8837b2a2f03baf5906a0c34700045cea79 (patch) | |
tree | 6e40714bb3753b4fb86c916a829d5e8e2031cf54 | |
parent | f70df5ad4bfe4009d97a546a97002b0552395734 (diff) |
uzbl: fix file_exists function by using access() instead of fopen() on fifo and socket files
-rw-r--r-- | uzbl.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -441,12 +441,7 @@ new_action(const gchar *name, const gchar *param) { static bool file_exists (const char * filename) { - FILE *file = fopen (filename, "r"); - if (file) { - fclose (file); - return true; - } - return false; + return (access(filename, F_OK) == 0); } void |