1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

avoid saving the file everytime we jump

This commit is contained in:
Joel Schaerer 2009-05-30 10:29:43 +02:00
parent 4a34c3bfd2
commit 8b4e282a91

View File

@ -58,8 +58,6 @@ def save(path_dict,dic_file):
os.rename(dic_file+".tmp",dic_file) #cf. http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/
except OSError:
pass #Fail quietly, this usually means a concurrent autojump process already did the job
#import shutil
#shutil.copy(dic_file+".tmp",dic_file) #cPickle.dump doesn't seem to be atomic, so this is more secure
def forget(path_dict,dic_file):
"""Gradually forget about directories. Only call from the actual jump since it can take time"""