fix issues with reading and writing to tar archives
This commit is contained in:
parent
0fad47d8ed
commit
95813fade2
@ -566,13 +566,13 @@ prepare_pkg(char PACKAGE[])
|
|||||||
char buffer[BUFFER_SIZE];
|
char buffer[BUFFER_SIZE];
|
||||||
size_t bytes_read;
|
size_t bytes_read;
|
||||||
|
|
||||||
pkg_old = fopen(PACKAGE, "r");
|
pkg_old = fopen(PACKAGE, "rb");
|
||||||
if (pkg_old == NULL) {
|
if (pkg_old == NULL) {
|
||||||
errlog("Failed to open source package file");
|
errlog("Failed to open source package file");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_new = fopen(PKG_NEW, "w");
|
pkg_new = fopen(PKG_NEW, "wb");
|
||||||
if (pkg_new == NULL) {
|
if (pkg_new == NULL) {
|
||||||
errlog("Failed to create destination package file");
|
errlog("Failed to create destination package file");
|
||||||
fclose(pkg_old);
|
fclose(pkg_old);
|
||||||
|
Loading…
Reference in New Issue
Block a user