[file-roller] Error when creating an archive with no extension



commit 3f37b297b793d562922cdc9983ab8e079b651277
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri Apr 30 16:45:38 2021 +0200

    Error when creating an archive with no extension
    
    Fixes https://gitlab.gnome.org/GNOME/file-roller/-/issues/99

 src/fr-archive.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/fr-archive.c b/src/fr-archive.c
index f22b156e..52d757e8 100644
--- a/src/fr-archive.c
+++ b/src/fr-archive.c
@@ -603,6 +603,9 @@ fr_archive_create (GFile      *file,
                                                mime_type,
                                                FR_ARCHIVE_CAN_WRITE);
 
+       if (archive == NULL)
+               return NULL;
+
        parent = g_file_get_parent (file);
        archive->priv->have_write_permissions = _g_file_check_permissions (parent, W_OK);
        archive->read_only = ! fr_archive_is_capable_of (archive, FR_ARCHIVE_CAN_WRITE) || ! 
archive->priv->have_write_permissions;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]