From: Yo man Date: Mon, 15 Jun 2026 18:13:10 +0000 (+0200) Subject: Fixed some stuff X-Git-Url: https://git.ayabusa.dev/?a=commitdiff_plain;ds=sidebyside;p=thoryum.git Fixed some stuff --- diff --git a/Makefile b/Makefile index d5c85f7..fde9099 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ -DBG_CFLAGS = -Wall -Wextra -g -fsanitize=address +DBG_CFLAGS = -Wall -Wextra -g PROD_CFLAGS = -Wall -Wextra -Os LIBS = -lzip -lcurl -SRC = src/main.c src/cpu.c src/downloader.c src/cli.c src/unzip.c -OBJ = build/main.o build/cpu.o build/downloader.o build/cli.o build/unzip.o +SRC = src/main.c src/cpu.c src/downloader.c src/cli.c src/unzip.c src/path.c +OBJ = build/main.o build/cpu.o build/downloader.o build/cli.o build/unzip.o build/path.o RES = build/Thoryum release: CFLAGS = $(PROD_CFLAGS) diff --git a/src/main.c b/src/main.c index 2a72d39..0939c5b 100644 --- a/src/main.c +++ b/src/main.c @@ -85,12 +85,12 @@ void install(struct ctx *ctx) { printf("Patching .desktop file\n"); char *desktop_path = patch_desktop_file(install_loc); - printf("Register that shit up\n"); + printf("Register that shit up '%s'\n", desktop_path); register_desktop(desktop_path); + printf("Cya gang ;D\n"); free(install_loc); free(desktop_path); - printf("Cya gang ;D\n"); } void update(struct ctx *ctx) { @@ -117,6 +117,7 @@ int main(int argc, char **argv) { if (!ctx->silent) { printf("Are you sure you want to procede with the installation of Thorium ? [y/n] "); + fflush(stdout); char response; scanf("%c", &response); if (toupper(response) != 'Y') { diff --git a/src/unzip.c b/src/unzip.c index 1c27f4e..f1bf458 100644 --- a/src/unzip.c +++ b/src/unzip.c @@ -39,8 +39,9 @@ int zip_extract_to(char *zip_path, char *extract_loc) { int len = strlen(sb.name); path name = init_path(extract_loc); - cat_path(name, (const path)sb.name); + name = cat_path(name, (const path)sb.name); len = strlen(name); + printf("extracticng file '%s' to '%s'\n", sb.name, name); if (name[len - 1] == '/') safe_create_dir(name);