maxwellyu1024 / bpbible

Automatically exported from code.google.com/p/bpbible
Other
0 stars 0 forks source link

Saving settings fails on project exit #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open the application from a clean subversion copy.
2. Exit the application.

What is the expected output? What do you see instead?
The program is expected to exit.  Instead, it gives an OSError on saving
settings if the data directory does not exist. 

Original issue reported on code.google.com by jonmmor...@gmail.com on 25 Mar 2008 at 11:42

GoogleCodeExporter commented 9 years ago
In mainframe.py, in the def save_data, lines 281-285, I see 
        try:
        #   if not os.path.exists(config.data_path):
        #       os.makedirs(config.data_path)

            config_manager.save()
I presume that lines 282 and 283 are commented out as the config_manager.save() 
may 
be going to a different place?

And so I believe that the solution is to add in util/configmgr.py, just before 
the 
end of ConfigManager.save(), in line 88 of the file,
        if not os.path.exists(self["Internal"]["path"]):
            os.makedirs(os.path.dirname(self["Internal"]["path"]))

Original comment by chris.morganiser on 7 Apr 2008 at 1:11

GoogleCodeExporter commented 9 years ago
Should be fixed as of r57.

Original comment by benpmor...@gmail.com on 7 Apr 2008 at 6:00