forked from enlightenment/enlightenment
*Only put the E_App in the hash after it has passed all tests.
Thanks to metrics for helping to debug this. *It's not a white space argument between raster and I, it's an arguement between our respective editors. His is the only editor that can handle odd number of spaces indentation, mine keeps trying to convert it to 4 or 8 character tabs. Sorry for the noisy white space stuff in this commit. SVN revision: 26241
This commit is contained in:
parent
9ff6bf18d4
commit
50bb66fe29
|
@ -320,6 +320,7 @@ e_app_new(const char *path, int scan_subdirs)
|
|||
E_App *a;
|
||||
struct stat st;
|
||||
int stated = 0;
|
||||
int new_app = 0;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
if (!path) return NULL;
|
||||
|
@ -350,10 +351,9 @@ e_app_new(const char *path, int scan_subdirs)
|
|||
|
||||
if ((!a) && (ecore_file_exists(path)))
|
||||
{
|
||||
/* Create it and add it to the cache. */
|
||||
/* Create it. */
|
||||
a = e_app_empty_new(path);
|
||||
if (a)
|
||||
_e_apps_every_app = evas_hash_direct_add(_e_apps_every_app, a->path, a);
|
||||
new_app = 1;
|
||||
}
|
||||
|
||||
if ((a) && (a->path))
|
||||
|
@ -397,6 +397,9 @@ e_app_new(const char *path, int scan_subdirs)
|
|||
else
|
||||
goto error;
|
||||
|
||||
if (new_app)
|
||||
_e_apps_every_app = evas_hash_direct_add(_e_apps_every_app, a->path, a);
|
||||
|
||||
/* Timestamp the cache, and no need to stat the file twice if the cache was stale. */
|
||||
if ((stated) || (stat(a->path, &st) >= 0))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue