diff options
author | Tomas Bzatek <tbzatek@src.gnome.org> | 2008-05-22 14:51:01 +0000 |
---|---|---|
committer | Tomas Bzatek <tbzatek@src.gnome.org> | 2008-05-22 14:51:01 +0000 |
commit | f6021db78d84e60d91504093a4211389ee0f2b10 (patch) | |
tree | b4520dcc829c588ea770e86751fdf2f17a4c110c /daemon/gvfsbackendarchive.c | |
parent | 5086dd77de212a495e3261b70167712312c11ff1 (diff) | |
download | gvfs-f6021db78d84e60d91504093a4211389ee0f2b10.tar.gz |
Improve error handling allowing to mount non-standard ISO images
svn path=/trunk/; revision=1777
Diffstat (limited to 'daemon/gvfsbackendarchive.c')
-rw-r--r-- | daemon/gvfsbackendarchive.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/daemon/gvfsbackendarchive.c b/daemon/gvfsbackendarchive.c index a1ebe064..0334d232 100644 --- a/daemon/gvfsbackendarchive.c +++ b/daemon/gvfsbackendarchive.c @@ -457,8 +457,14 @@ create_file_tree (GVfsBackendArchive *ba, GVfsJob *job) do { result = archive_read_next_header (archive->archive, &entry); - if (result == ARCHIVE_OK) + if (result >= ARCHIVE_WARN && result <= ARCHIVE_OK) { + if (result < ARCHIVE_OK) { + DEBUG ("archive_read_next_header: result = %d, error = '%s'\n", result, archive_error_string (archive->archive)); + archive_set_error (archive->archive, ARCHIVE_OK, "No error"); + archive_clear_error (archive->archive); + } + ArchiveFile *file = archive_file_get_from_path (ba->files, archive_entry_pathname (entry), TRUE); @@ -600,8 +606,14 @@ do_open_for_read (GVfsBackend * backend, do { result = archive_read_next_header (archive->archive, &entry); - if (result == ARCHIVE_OK) + if (result >= ARCHIVE_WARN && result <= ARCHIVE_OK) { + if (result < ARCHIVE_OK) { + DEBUG ("do_open_for_read: result = %d, error = '%s'\n", result, archive_error_string (archive->archive)); + archive_set_error (archive->archive, ARCHIVE_OK, "No error"); + archive_clear_error (archive->archive); + } + if (g_str_equal (archive_entry_pathname (entry), filename + 1)) { /* SUCCESS */ |