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:
parent
07e5767952
commit
d1a38d150e
2
autojump
2
autojump
@ -88,7 +88,7 @@ def save(path_dict, dic_file):
|
|||||||
temp.close()
|
temp.close()
|
||||||
#cf. http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/
|
#cf. http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/
|
||||||
import shutil
|
import shutil
|
||||||
shutil.copy(temp.name, dic_file)
|
shutil.move(temp.name, dic_file)
|
||||||
try: #backup file
|
try: #backup file
|
||||||
import time
|
import time
|
||||||
if (not os.path.exists(dic_file+".bak") or
|
if (not os.path.exists(dic_file+".bak") or
|
||||||
|
Loading…
Reference in New Issue
Block a user