raghuram534 / autokey

Automatically exported from code.google.com/p/autokey
GNU General Public License v3.0
0 stars 0 forks source link

Configuration file backup is updated simultaneously with the configuration file. #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Save any configuration change.

What is the expected output? What do you see instead?
The backup file, autokey.json~ should be replaced with the previous
configuration file.
Instead it's replaced with the current file.  I guess the configuration is
saved twice each time.

What version of the product are you using? On what operating system?
v0.70 on Ubuntu Hardy

Please provide any additional information below.
Previous versions (at least GTK 0.61.3) did not have this issue.

Original issue reported on code.google.com by dv8box-...@yahoo.com on 12 Apr 2010 at 1:48

GoogleCodeExporter commented 8 years ago
I'm not seeing the behaviour you describe. Can you get log out put 
demonstrating the
problem?

Original comment by cdekter on 12 Apr 2010 at 2:41

GoogleCodeExporter commented 8 years ago
Sorry, I got fooled by the file timestamps being the same when the size didn't 
change
much.

You are using shutil.copy in 4 places in configmanager.py.  If you use 
shutil.copy2,
it will preserve the timestamps, which I think is more helpful because it 
reflects
the actual age of the data.

Original comment by dv8box-...@yahoo.com on 12 Apr 2010 at 1:38

GoogleCodeExporter commented 8 years ago
Implement change to shutil.copy2

Original comment by cdekter on 13 Apr 2010 at 2:01