Mercurial > libpst
changeset 366:67a3ee227495
fix bug in code allowing folders containing multiple item types
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 24 Oct 2016 08:43:08 -0700 |
parents | e4c414ff8fa2 |
children | 6b7c19a820e1 |
files | regression/regression-tests.bash src/readpst.c |
diffstat | 2 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/regression/regression-tests.bash Tue Aug 30 15:04:12 2016 -0700 +++ b/regression/regression-tests.bash Mon Oct 24 08:43:08 2016 -0700 @@ -27,7 +27,7 @@ if [ -z "$val" ] || [ $size -lt 10000000 ]; then echo $fn mkdir output$n - $val ../src/pst2dii -f /usr/share/fonts/bitstream-vera/VeraMono.ttf -B "bates-" -o output$n -O $ba.mydii -d $fn.log $fn >$fn.dii.err 2>&1 + $val ../src/pst2dii -f /usr/share/fonts/liberation/LiberationMono-Regular.ttf -B "bates-" -o output$n -O $ba.mydii -d $fn.log $fn >$fn.dii.err 2>&1 fi }
--- a/src/readpst.c Tue Aug 30 15:04:12 2016 -0700 +++ b/src/readpst.c Mon Oct 24 08:43:08 2016 -0700 @@ -2225,12 +2225,11 @@ check_filename(temp); while ((f->output[t] = fopen(temp, "r"))) { DEBUG_INFO(("need to increase filename because one already exists with that name\n")); - DEBUG_INFO(("- increasing it to %s%d\n", f->name, x)); x++; - sprintf(temp, "%s%08d", f->name, x); - DEBUG_INFO(("- trying \"%s\"\n", f->name)); + sprintf(temp, "%s%08d", f->name[t], x); + DEBUG_INFO(("- bump file name and try \"%s\"\n", temp)); if (x == 99999999) { - DIE(("create_enter_dir: Why can I not create a folder %s? I have tried %i extensions...\n", f->name, x)); + DIE(("create_enter_dir: Why can I not create a folder %s? I have tried %i extensions...\n", f->name[t], x)); } fclose(f->output[t]); }