diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2013-08-02 15:34:19 +0800 |
---|---|---|
committer | LAN-TW <lantw44@gmail.com> | 2013-08-02 15:34:19 +0800 |
commit | af6302385401fc47db259b957eee074afe040c95 (patch) | |
tree | d3076c1859bfb968fa5372f9981e6154d78b982c /gnome-autoar/autoar-extract.c | |
parent | cb68b632b19381916fec8b0697b2054fa7a23d87 (diff) | |
download | gsoc2013-libgnome-autoar-af6302385401fc47db259b957eee074afe040c95.tar.gz gsoc2013-libgnome-autoar-af6302385401fc47db259b957eee074afe040c95.tar.zst gsoc2013-libgnome-autoar-af6302385401fc47db259b957eee074afe040c95.zip |
The man pages of libarchive recommend using archive_entry_perm
Diffstat (limited to 'gnome-autoar/autoar-extract.c')
-rw-r--r-- | gnome-autoar/autoar-extract.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gnome-autoar/autoar-extract.c b/gnome-autoar/autoar-extract.c index c6a8a08..2fdd3a7 100644 --- a/gnome-autoar/autoar-extract.c +++ b/gnome-autoar/autoar-extract.c @@ -658,7 +658,7 @@ autoar_extract_do_write_entry (AutoarExtract *arextract, g_debug ("autoar_extract_do_write_entry: permissions"); g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_UNIX_MODE, - archive_entry_mode (entry)); + archive_entry_perm (entry)); #ifdef HAVE_LINK if (hardlink != NULL) { @@ -734,6 +734,9 @@ autoar_extract_do_write_entry (AutoarExtract *arextract, if (arextract->priv->error->code == G_IO_ERROR_EXISTS) { g_error_free (arextract->priv->error); arextract->priv->error = NULL; + } else { + g_object_unref (info); + return; } } break; @@ -750,11 +753,11 @@ autoar_extract_do_write_entry (AutoarExtract *arextract, case AE_IFIFO: g_debug ("autoar_extract_do_write_entry: case FIFO"); # ifdef HAVE_MKFIFO - r = mkfifo (str = g_file_get_path (dest), archive_entry_mode (entry)); + r = mkfifo (str = g_file_get_path (dest), archive_entry_perm (entry)); g_free (str); # else r = mknod (str = g_file_get_path (dest), - S_IFIFO | archive_entry_mode (entry), + S_IFIFO | archive_entry_perm (entry), 0); g_free (str); # endif @@ -764,21 +767,21 @@ autoar_extract_do_write_entry (AutoarExtract *arextract, case AE_IFSOCK: g_debug ("autoar_extract_do_write_entry: case SOCK"); r = mknod (str = g_file_get_path (dest), - S_IFSOCK | archive_entry_mode (entry), + S_IFSOCK | archive_entry_perm (entry), 0); g_free (str); break; case AE_IFBLK: g_debug ("autoar_extract_do_write_entry: case BLK"); r = mknod (str = g_file_get_path (dest), - S_IFBLK | archive_entry_mode (entry), + S_IFBLK | archive_entry_perm (entry), archive_entry_rdev (entry)); g_free (str); break; case AE_IFCHR: g_debug ("autoar_extract_do_write_entry: case CHR"); r = mknod (str = g_file_get_path (dest), - S_IFCHR | archive_entry_mode (entry), + S_IFCHR | archive_entry_perm (entry), archive_entry_rdev (entry)); g_free (str); break; |