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

don't need temp file

This commit is contained in:
xiaonaitong 2011-09-21 10:26:49 +08:00
parent 07e5767952
commit d1a38d150e

View File

@ -88,7 +88,7 @@ def save(path_dict, dic_file):
temp.close()
#cf. http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/
import shutil
shutil.copy(temp.name, dic_file)
shutil.move(temp.name, dic_file)
try: #backup file
import time
if (not os.path.exists(dic_file+".bak") or