diff options
Diffstat (limited to 'getabook.c')
-rw-r--r-- | getabook.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -145,7 +145,7 @@ int getpage(Page *page) int main(int argc, char *argv[]) { - char buf[BUFSIZ], pgpath[STRMAX]; + char buf[BUFSIZ], pgpath[STRMAX], pgpath2[STRMAX]; char in[16]; int a, i, n; FILE *f; @@ -176,7 +176,8 @@ int main(int argc, char *argv[]) if(argc == 2) { for(i=0; i<numpages; i++) { snprintf(pgpath, STRMAX, "%s/%04d.png", bookdir, pages[i]->num); - if((f = fopen(pgpath, "r")) != NULL) { + snprintf(pgpath2, STRMAX, "%s/%04d.jpg", bookdir, pages[i]->num); + if((f = fopen(pgpath, "r")) != NULL || (f = fopen(pgpath2, "r")) != NULL) { fclose(f); continue; } |