Make sure to save config on crash
This commit is contained in:
parent
85646af2d0
commit
c4edc6f5da
@ -157,6 +157,7 @@ class QuteBrowser(QApplication):
|
||||
argv = [sys.executable] + sys.argv + pages
|
||||
logging.debug('Running {} with args {}'.format(sys.executable,
|
||||
argv))
|
||||
config.config.save()
|
||||
sys.stdout.flush()
|
||||
# FIXME this seems broken on Windows, execv() splits on whitespace
|
||||
# in arguments?!?
|
||||
|
@ -187,6 +187,8 @@ class Config(ConfigParser):
|
||||
logging.debug("Saving config to {}".format(self.configfile))
|
||||
with open(self.configfile, 'w') as f:
|
||||
self.write(f)
|
||||
f.flush()
|
||||
os.fsync(f.fileno())
|
||||
|
||||
def dump_userconfig(self):
|
||||
"""Returns the part of the config which was changed by the user as a
|
||||
|
Loading…
Reference in New Issue
Block a user