diff options
author | keis <keijser@gmail.com> | 2011-05-15 00:26:34 +0200 |
---|---|---|
committer | keis <keijser@gmail.com> | 2011-05-15 00:26:34 +0200 |
commit | 6672b88cf8c02fe2d03b15780996a75a6158ff0a (patch) | |
tree | 6a31631772bb066790043753b37567b5e70cbd8d /src/util.c | |
parent | ed8f45d6eb21e5a931d55235708bcc73a2191771 (diff) |
Check if file exist before trying to run it
find_existing_file modified to return NULL when file does not exist
even for simple paths.
run_external_js and spawn prints error messages when a file could not be
loaded.
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -134,7 +134,7 @@ find_existing_file(const gchar* path_list) { char *basename = strrchr(path_list_dup, ':'); if(!basename) - return path_list_dup; + return file_exists(path_list_dup) ? path_list_dup : NULL; basename[0] = '\0'; basename++; |