1
0
mirror of https://github.com/wting/autojump synced 2024-09-28 22:10:45 +00:00
This commit is contained in:
rmNULL 2017-10-06 11:25:28 +00:00 committed by GitHub
commit 03e674893c

View File

@ -134,12 +134,14 @@ def save(config, data):
f.flush() f.flush()
os.fsync(f) os.fsync(f)
except IOError as ex:
print('Error saving autojump data (disk full?)' % ex, file=sys.stderr)
sys.exit(1)
# move temp_file -> autojump.txt # move temp_file -> autojump.txt
move_file(temp.name, config['data_path']) move_file(temp.name, config['data_path'])
except IOError as ex:
print('%s Error saving autojump data (disk full?)' % ex, file=sys.stderr)
sys.exit(1)
# create backup file if it doesn't exist or is older than BACKUP_THRESHOLD # create backup file if it doesn't exist or is older than BACKUP_THRESHOLD
if not os.path.exists(config['backup_path']) or \ if not os.path.exists(config['backup_path']) or \