Check that the file exists before trying to parse it. This stops libxml

2002-05-10  Anders Carlsson  <andersca@gnu.org>

	* src/nautilus-bookmark-list.c: (nautilus_bookmark_list_load_file):
	Check that the file exists before trying to parse it. This stops
	libxml from spewing crack "entity not found" messages.
This commit is contained in:
Anders Carlsson 2002-05-10 20:17:05 +00:00 committed by Anders Carlsson
parent e91eb94f99
commit adce739233
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2002-05-10 Anders Carlsson <andersca@gnu.org>
* src/nautilus-bookmark-list.c: (nautilus_bookmark_list_load_file):
Check that the file exists before trying to parse it. This stops
libxml from spewing crack "entity not found" messages.
2002-05-10 Damon Chaplin <damon@ximian.com>
* libnautilus-private/nautilus-directory-async.c (link_info_read_done):

View file

@ -422,6 +422,11 @@ nautilus_bookmark_list_load_file (NautilusBookmarkList *bookmarks)
/* Wipe out old list. */
clear (bookmarks);
if (!g_file_test (nautilus_bookmark_list_get_file_path (bookmarks),
G_FILE_TEST_EXISTS)) {
return;
}
/* Read new list from file */
doc = xmlParseFile (nautilus_bookmark_list_get_file_path (bookmarks));
for (node = eel_xml_get_root_children (doc);