mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
szip: add support for unpacking zip archives and simple zip files
This commit is contained in:
4
thirdparty/zip/zip.c
vendored
4
thirdparty/zip/zip.c
vendored
@@ -1007,6 +1007,10 @@ int zip_extract(const char *zipname, const char *dir,
|
||||
return status;
|
||||
}
|
||||
|
||||
int zip_extract_without_callback(const char *zipname, const char *dir) {
|
||||
return zip_extract(zipname, dir, NULL, NULL);
|
||||
} // for simple V bind ¯\_(ツ)_/¯
|
||||
|
||||
int zip_extract_stream(const char *stream, size_t size, const char *dir,
|
||||
int (*on_extract)(const char *filename, void *arg),
|
||||
void *arg) {
|
||||
|
2
thirdparty/zip/zip.h
vendored
2
thirdparty/zip/zip.h
vendored
@@ -312,6 +312,8 @@ extern int zip_create(const char *zipname, const char *filenames[], size_t len);
|
||||
extern int zip_extract(const char *zipname, const char *dir,
|
||||
int (*on_extract_entry)(const char *filename, void *arg),
|
||||
void *arg);
|
||||
// temporary working unzip solution
|
||||
extern int zip_extract_without_callback(const char *zipname, const char *dir);
|
||||
|
||||
/**
|
||||
* Extracts a zip archive stream into directory.
|
||||
|
Reference in New Issue
Block a user