aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/menus/gal-view-collection.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c
index 49339f4473..4ac0ae68dd 100644
--- a/widgets/menus/gal-view-collection.c
+++ b/widgets/menus/gal-view-collection.c
@@ -24,6 +24,7 @@
#include <config.h>
#include <util/e-i18n.h>
+#include <sys/stat.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
@@ -384,13 +385,16 @@ load_single_dir (GalViewCollection *collection,
char *dir,
gboolean local)
{
- xmlDoc *doc;
+ xmlDoc *doc = NULL;
xmlNode *root;
xmlNode *child;
char *filename = g_concat_dir_and_file(dir, "galview.xml");
char *default_view;
-
- doc = xmlParseFile(filename);
+ struct stat st;
+
+ if (stat (filename, &st) != -1 && S_ISREG (st.st_mode))
+ doc = xmlParseFile (filename);
+
if (!doc) {
g_free (filename);
return;