Index: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 8673) +++ trunk/src_plugins/io_lihata/write.c (revision 8674) @@ -989,8 +989,9 @@ events.output_rules = io_lihata_out_rules; res = lhtpers_fsave_as(&events, brd, inf, FP, old_filename, &errmsg); - if (res == LHTPERS_ERR_ROOT_MISMATCH) { - /* different lht file; the user requested the save, including overwrite, so do that */ + if ((res == LHTPERS_ERR_ROOT_MISMATCH) || (res == LHTPERS_ERR_ROOT_MISSING)) { + /* target is a different lht file or not even an lht file; the user requested the save, including overwrite, so do that */ + rewind(FP); res = lhtpers_fsave_as(&events, brd, NULL, FP, old_filename, &errmsg); } if (res != 0) {