projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8e65767
)
Undeprecate libarchive calls; Patch by Christian Hesse.
author
Colin Leroy
<colin@colino.net>
Thu, 19 Jun 2014 05:51:34 +0000
(07:51 +0200)
committer
Colin Leroy
<colin@colino.net>
Thu, 19 Jun 2014 05:51:34 +0000
(07:51 +0200)
src/plugins/archive/libarchive_archive.c
patch
|
blob
|
history
diff --git
a/src/plugins/archive/libarchive_archive.c
b/src/plugins/archive/libarchive_archive.c
index 478202c3c56a8e6c17424a2029b7b250871e1a0f..492fea713691e00129212046eddd418ce3d5c56e 100644
(file)
--- a/
src/plugins/archive/libarchive_archive.c
+++ b/
src/plugins/archive/libarchive_archive.c
@@
-389,7
+389,7
@@
const gchar* archive_extract(const char* archive_name, int flags) {
in = archive_read_new();
if ((res = archive_read_support_format_tar(in)) == ARCHIVE_OK) {
if ((res = archive_read_support_compression_gzip(in)) == ARCHIVE_OK) {
in = archive_read_new();
if ((res = archive_read_support_format_tar(in)) == ARCHIVE_OK) {
if ((res = archive_read_support_compression_gzip(in)) == ARCHIVE_OK) {
- if ((res = archive_read_open_file(
+ if ((res = archive_read_open_file
name
(
in, archive_name, READ_BLOCK_SIZE)) != ARCHIVE_OK) {
buf = g_strdup_printf(
"%s: %s\n", archive_name, archive_error_string(in));
in, archive_name, READ_BLOCK_SIZE)) != ARCHIVE_OK) {
buf = g_strdup_printf(
"%s: %s\n", archive_name, archive_error_string(in));
@@
-444,7
+444,7
@@
const gchar* archive_extract(const char* archive_name, int flags) {
result = archive_error_string(out);
archive_read_close(in);
}
result = archive_error_string(out);
archive_read_close(in);
}
- archive_read_f
inish
(in);
+ archive_read_f
ree
(in);
}
else
result = archive_error_string(in);
}
else
result = archive_error_string(in);
@@
-478,21
+478,21
@@
const gchar* archive_create(const char* archive_name, GSList* files,
arch = archive_write_new();
switch (method) {
case ZIP:
arch = archive_write_new();
switch (method) {
case ZIP:
- if (archive_write_
set_compression
_gzip(arch) != ARCHIVE_OK)
+ if (archive_write_
add_filter
_gzip(arch) != ARCHIVE_OK)
return archive_error_string(arch);
break;
case BZIP2:
return archive_error_string(arch);
break;
case BZIP2:
- if (archive_write_
set_compression
_bzip2(arch) != ARCHIVE_OK)
+ if (archive_write_
add_filter
_bzip2(arch) != ARCHIVE_OK)
return archive_error_string(arch);
break;
#if NEW_ARCHIVE_API
case COMPRESS:
return archive_error_string(arch);
break;
#if NEW_ARCHIVE_API
case COMPRESS:
- if (archive_write_
set_compression
_compress(arch) != ARCHIVE_OK)
+ if (archive_write_
add_filter
_compress(arch) != ARCHIVE_OK)
return archive_error_string(arch);
break;
#endif
case NO_COMPRESS:
return archive_error_string(arch);
break;
#endif
case NO_COMPRESS:
- if (archive_write_
set_compression
_none(arch) != ARCHIVE_OK)
+ if (archive_write_
add_filter
_none(arch) != ARCHIVE_OK)
return archive_error_string(arch);
break;
}
return archive_error_string(arch);
break;
}
@@
-516,7
+516,7
@@
const gchar* archive_create(const char* archive_name, GSList* files,
case NO_FORMAT:
return "Missing archive format";
}
case NO_FORMAT:
return "Missing archive format";
}
- if (archive_write_open_file(arch, archive_name) != ARCHIVE_OK)
+ if (archive_write_open_file
name
(arch, archive_name) != ARCHIVE_OK)
return archive_error_string(arch);
while (files && ! stop_action) {
return archive_error_string(arch);
while (files && ! stop_action) {
@@
-592,7
+592,7
@@
const gchar* archive_create(const char* archive_name, GSList* files,
stop_action = FALSE;
#endif
archive_write_close(arch);
stop_action = FALSE;
#endif
archive_write_close(arch);
- archive_write_f
inish
(arch);
+ archive_write_f
ree
(arch);
return NULL;
}
return NULL;
}