Starting a pack always removes the .old
file.
When there then is nothing to pack, no new .old
file is created in it's place.
See the FileStorage.pack()
method; it deletes an existing .old
file right after acquiring the packing lock.
The logic goes (with some indentation and intermediary code removed):
oldpath = self._file_name + ".old"
if os.path.exists(oldpath):
os.remove(oldpath)
# collect pack info
pack_result = self.packer(self, referencesf, stop, gc)
if pack_result is None:
return
os.rename(self._file_name, oldpath)