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

redo previlege check except in windows

This commit is contained in:
xiaonaitong 2011-09-15 16:05:51 +08:00
parent a6410994c2
commit d9a423370a

View File

@ -55,6 +55,7 @@ def save(path_dict, dic_file):
a backup file."""
# If the dic_file exists, check that it belongs to us
# Otherwise, fail quietly
if (not os.path.exists(dic_file)) or os.name == 'nt' or os.getuid() == os.stat(dic_file)[4]:
temp = NamedTemporaryFile(dir=CONFIG_DIR, delete=False)
pickle.dump(path_dict, temp, 2)
temp.flush()