--- apps/plugins/test_codec.c (revision 24796) +++ apps/plugins/test_codec.c (working copy) @@ -930,6 +930,10 @@ entry = rb->readdir(dir); while (entry) { if (!(entry->attribute & ATTR_DIRECTORY)) { + /*close and reopen the handle in case the codec crashes so + data is less likely to be lost*/ + rb->close(log_fd); + log_fd = rb->open(logfilename, O_RDWR|O_CREAT|O_APPEND); rb->snprintf(filename,sizeof(filename),"%s%s",dirpath,entry->d_name); test_track(filename); log_text("", true);