** 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
This commit is contained in:
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user