aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Damien Leone <damien.leone@fensalir.fr>2009-05-16 16:20:15 +0200
committerGravatar Damien Leone <damien.leone@fensalir.fr>2009-05-16 16:20:15 +0200
commit43283a8837b2a2f03baf5906a0c34700045cea79 (patch)
tree6e40714bb3753b4fb86c916a829d5e8e2031cf54
parentf70df5ad4bfe4009d97a546a97002b0552395734 (diff)
uzbl: fix file_exists function by using access() instead of fopen() on fifo and socket files
-rw-r--r--uzbl.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/uzbl.c b/uzbl.c
index 2e26e8f..288aaae 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -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