Thread: Clips bar empty
View Single Post
Old 09-27-2017, 06:09 AM   #51
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,668
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by kovidgoyal View Post
This should be easy to fix by simply using atomic writes for the config file. i.e. have the code that writes the config file write to temp file and rename the temp file to the original after the write is complete.

The file system watcher should notify you about the rename and you are guaranteed that when the rename arrives, the file contents are updated.
Thanks much for the suggestions, Kovid.
DiapDealer is online now   Reply With Quote