forked from cory/tildefriends
Fix loading from not standalone zip.
This commit is contained in:
parent
5385264f94
commit
9164be2f37
10
src/main.c
10
src/main.c
@ -11,6 +11,7 @@
|
||||
|
||||
#include "backtrace.h"
|
||||
#include "sqlite3.h"
|
||||
#include "unzip.h"
|
||||
|
||||
#include <getopt.h>
|
||||
#include <stdlib.h>
|
||||
@ -412,11 +413,18 @@ static int _tf_command_run(const char* file, int argc, char* argv[])
|
||||
.http_port = 12345,
|
||||
.https_port = 12346,
|
||||
.ssb_port = 8008,
|
||||
.zip = file,
|
||||
.db_path = k_db_path_default,
|
||||
};
|
||||
bool show_usage = false;
|
||||
|
||||
/* Check if the executable has data attached. */
|
||||
unzFile zip = unzOpen(file);
|
||||
if (zip)
|
||||
{
|
||||
args.zip = file;
|
||||
unzClose(zip);
|
||||
}
|
||||
|
||||
while (!show_usage)
|
||||
{
|
||||
static const struct option k_options[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user