X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=blobdiff_plain;f=pctb%2Fconvert.c;h=c7c027adb05baa0c3ba3f879ef2a38c20a7298ec;hp=950300b588d1cc7e1e7fe9afc5409f0c4084c8d2;hb=37dc407a29c681a0f8599609759be5a53058f9b1;hpb=f84da177dd7e293fdc30e095af232cca5d40d82e diff --git a/pctb/convert.c b/pctb/convert.c index 950300b..c7c027a 100644 --- a/pctb/convert.c +++ b/pctb/convert.c @@ -82,9 +82,6 @@ static void open_screenshot_file(const char *mode) { if (!screenshot_file) fatal("could not open screenshots file `%s': %s", o_screenshot_fn, strerror(errno)); - - if ((o_flags & ff_upload) && !(o_flags & ff_testservers)) - badusage("must not reuse screenshots for upload to live PCTB database"); } static void run_analysis(void) { @@ -95,7 +92,7 @@ static void run_analysis(void) { analyse(tf); if (o_flags & ff_upload) { - if (o_flags & ff_singlepage) + if (npages<=1) fatal("Recognition successful, but refusing to upload partial data\n" " (--single-page specified). Specify an output mode?"); } @@ -130,7 +127,7 @@ void fetch_with_rsync(const char *stem) { if (DEBUGP(rsync)) fprintf(stderr,"executing rsync to fetch %s to %s\n",remote,local); execlp(rsync, "rsync", - DEBUGP(rsync) ? "-vLt" : "-Lt", + DEBUGP(rsync) ? "-zvLt" : "-zLt", "--",remote,local,(char*)0); sysassert(!"exec rsync failed"); } @@ -300,6 +297,8 @@ int main(int argc, char **argv) { progress_log("OK for you to move the mouse now."); } if (o_mode & mf_readscreenshot) { + if ((o_flags & ff_upload) && !(o_flags & ff_testservers)) + badusage("must not reuse screenshots for upload to live PCTB database"); open_screenshot_file("r"); if (o_flags & ff_singlepage) read_one_screenshot(); else read_screenshots();