Skip to content
Snippets Groups Projects
Commit c128e10e authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Use fexistcase() for RIP assets

It seems that at least LORD has upper-case in the ZIPs and lower-case
in the queries.
parent 4ac15d67
No related branches found
No related tags found
No related merge requests found
...@@ -12492,6 +12492,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs) ...@@ -12492,6 +12492,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
if (!get_cache_fn_base(rip.bbs, cache_path, sizeof(cache_path))) if (!get_cache_fn_base(rip.bbs, cache_path, sizeof(cache_path)))
break; break;
strcat(cache_path, &args[6]); strcat(cache_path, &args[6]);
fexistcase(cache_path);
struct stat st; struct stat st;
char str[1024]; char str[1024];
char dstr[64]; char dstr[64];
...@@ -12621,6 +12622,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs) ...@@ -12621,6 +12622,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
strcat(cache_path, &args[9]); strcat(cache_path, &args[9]);
if (strchr(cache_path, '.') == NULL) if (strchr(cache_path, '.') == NULL)
strcat(cache_path, ".ICN"); strcat(cache_path, ".ICN");
fexistcase(cache_path);
icn = fopen(cache_path, "rb"); icn = fopen(cache_path, "rb");
if (icn != NULL) { if (icn != NULL) {
struct ciolib_pixels *pix = malloc(sizeof(struct ciolib_pixels)); struct ciolib_pixels *pix = malloc(sizeof(struct ciolib_pixels));
...@@ -13355,6 +13357,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs) ...@@ -13355,6 +13357,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
break; break;
} }
strncpy(&cache_path[cpln], &args[8], sizeof(cache_path) - cpln); strncpy(&cache_path[cpln], &args[8], sizeof(cache_path) - cpln);
fexistcase(cache_path);
FILE* fp = fopen(cache_path, "rb"); FILE* fp = fopen(cache_path, "rb");
if (fp == NULL) { if (fp == NULL) {
strcpy(rip.bbs->uldir, uldir); strcpy(rip.bbs->uldir, uldir);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment