]> git.pond.sub.org Git - empserver/commit
Fix empdump not to touch plane file when import fails
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 22 May 2011 05:46:57 +0000 (07:46 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 25 Jun 2011 15:05:12 +0000 (17:05 +0200)
commit6eec00105048eb50617b366eecfa40c664200595
tree51d28251d4f0a584a22a371bf17dfad30cc2be07
parent7da9aab5a1e0918baadd3296406e6bf4f9e65aa7
Fix empdump not to touch plane file when import fails

pln_zap_transient_flags() fixes up planes stuck in the air (commit
7ca4f412, v4.3.12).  Since commit 4e9e58bf (v4.3.14), it writes back
the fixed planes.  This is wrong for empdump.

empdump should touch data only on successful import.  When it fails
because ef_verify() fails, and any planes are found stuck in the air,
the plane file gets rewritten.

Make parameter ef_verify() take parameter may_put to let empdump
suppress the plane write-back.  The plane file still get written out
on successful import, along with the other imported game state.
include/file.h
src/lib/common/ef_verify.c
src/lib/subs/fileinit.c
src/util/empdump.c