Ecore ecore_file.c: NULL check before using strcmp().

SVN revision: 58168
This commit is contained in:
Daniel Juyung Seo 2011-03-29 02:28:41 +00:00
parent dde69f8e34
commit 736e8bf67b
1 changed files with 1 additions and 0 deletions

View File

@ -154,6 +154,7 @@ EAPI Eina_Bool
ecore_file_exists(const char *file)
{
struct stat st;
if (!file) return EINA_FALSE;
/*Workaround so that "/" returns a true, otherwise we can't monitor "/" in ecore_file_monitor*/
if (stat(file, &st) < 0 && strcmp(file, "/")) return EINA_FALSE;