Skip to content

Commit f22e886

Browse files
xyzzy42dpgeorge
authored andcommitted
py/makeqstrdefs.py: Don't skip output for stale hash file.
In "cat" mode a "$output_file.hash" file is checked to see if the hash of the new output is the same as the existing, and if so the output file isn't updated. However, it's possible that the output file has been deleted but the hash file has not. In this case the output file is not created. Change the logic so that a hash file is considered stale if there is no output file and still create the output. Signed-off-by: Trent Piepho <[email protected]>
1 parent 0d93392 commit f22e886

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/makeqstrdefs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def cat_together():
163163
mode_full = "Module registrations"
164164
elif args.mode == _MODE_ROOT_POINTER:
165165
mode_full = "Root pointer registrations"
166-
if old_hash != new_hash:
166+
if old_hash != new_hash or not os.path.exists(args.output_file):
167167
print(mode_full, "updated")
168168
try:
169169
# rename below might fail if file exists

0 commit comments

Comments
 (0)