Enlightenment CVS committal Author : kwo Project : e17 Module : libs/imlib2
Dir : e17/libs/imlib2/src/modules/loaders Modified Files: loader_id3.c Log Message: 1) Quit silently if file doesn't exist. 2) Don't close if open failed (fixes segv). =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/imlib2/src/modules/loaders/loader_id3.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- loader_id3.c 9 Aug 2005 09:11:02 -0000 1.3 +++ loader_id3.c 11 Aug 2005 18:00:40 -0000 1.4 @@ -6,6 +6,7 @@ #include <stdlib.h> #include <unistd.h> #include <sys/types.h> +#include <sys/stat.h> #include <fcntl.h> #include <assert.h> #include <errno.h> @@ -70,7 +71,6 @@ if (! file) { fprintf (stderr, "Unable to open tagged file %s: %s\n", filename, strerror (errno)); - id3_file_close (file); goto fail_free; } tag = id3_file_tag (file); @@ -440,8 +440,11 @@ ImlibLoader *loader; lopt opt; int res; + struct stat st; assert (im); + if (stat(im->real_file, &st) < 0) + return 0; if (! get_options (&opt, im)) return 0; ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs