diff options
author | Harry Lu <harry.lu@sun.com> | 2003-08-26 10:47:19 +0800 |
---|---|---|
committer | Harry Lu <haip@src.gnome.org> | 2003-08-26 10:47:19 +0800 |
commit | 7947421861b484a523f29de10253e50c7375c86e (patch) | |
tree | 10aa2cd0e67403b5c0d246f7cb636cbd48102fc6 | |
parent | dd0ff66d1f720715e8105f98096a44ffcec46d61 (diff) | |
download | gsoc2013-evolution-7947421861b484a523f29de10253e50c7375c86e.tar.gz gsoc2013-evolution-7947421861b484a523f29de10253e50c7375c86e.tar.zst gsoc2013-evolution-7947421861b484a523f29de10253e50c7375c86e.zip |
** For bug #47874.
2003-08-25 Harry Lu <harry.lu@sun.com>
** For bug #47874.
* e-table-specification.c (e_table_specification_load_from_file):
check whether file exists before call xmlParseFile().
* e-table-state.c (e_table_state_load_from_file): ditto.
* e-tree-table-adapter.c (open_file): ditto.
svn path=/trunk/; revision=22358
-rw-r--r-- | widgets/table/e-table-specification.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-state.c | 4 | ||||
-rw-r--r-- | widgets/table/e-tree-table-adapter.c | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c index e289ad2987..3fcc28689d 100644 --- a/widgets/table/e-table-specification.c +++ b/widgets/table/e-table-specification.c @@ -129,6 +129,10 @@ e_table_specification_load_from_file (ETableSpecification *specification, const char *filename) { xmlDoc *doc; + + if (!g_file_test (filename, G_FILE_TEST_EXISTS)) + return FALSE; + doc = xmlParseFile (filename); if (doc) { xmlNode *node = xmlDocGetRootElement (doc); diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c index 4ce1bf6d3a..c66e5933e0 100644 --- a/widgets/table/e-table-state.c +++ b/widgets/table/e-table-state.c @@ -120,6 +120,10 @@ e_table_state_load_from_file (ETableState *state, const char *filename) { xmlDoc *doc; + + if (!g_file_test (filename, G_FILE_TEST_EXISTS)) + return FALSE; + doc = xmlParseFile (filename); if (doc) { xmlNode *node = xmlDocGetRootElement(doc); diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c index 61b1c9dd0d..e1bda25eba 100644 --- a/widgets/table/e-tree-table-adapter.c +++ b/widgets/table/e-tree-table-adapter.c @@ -925,6 +925,9 @@ open_file (ETreeTableAdapter *etta, const char *filename) int vers; gboolean model_default, saved_default; + if (!g_file_test (filename, G_FILE_TEST_EXISTS)) + return NULL; + doc = xmlParseFile (filename); if (!doc) return NULL; |