bad paths for config and hiscores in windows
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
enjuewemela |
New
|
Undecided
|
Unassigned |
Bug Description
Bad paths for config and hiscores in windows
*** Demoing the config path problem:
choose options
start game
modify any seting, by example 'sound volume'
You see a traceback similar to
...
File "C:\Python26\
em__
self.
File "C:\Python26\
fp = open(fp, 'w')
IOError: [Errno 2] No such file or directory: '/.config\
*** Demoing the highscores path problem:
start game
choose new game , rush
play a game.
At gameover you get a traceback similar to
File "C:\Python26\
self.
File "C:\Python26\
with open(fname, 'wb') as fh:
IOError: [Errno 2] No such file or directory: '/.local\
*** why ?
paths provided by xdg.BaseDirectory have not much sense in windows.
*** workaround patch
I will paste here the bzr diff, seems that launchpad bug tracker don't allow to attach a file
=== modified file 'enjuewemela/
--- enjuewemela/main.py 2011-08-16 21:31:53 +0000
+++ enjuewemela/main.py 2011-09-08 14:27:15 +0000
@@ -11,6 +11,12 @@
import os
import sys
+# workaround for xdg problem in windows, corrects paths to config and hiscores
+import xdg.BaseDirectory as xd
+if sys.platform == 'win32':
+ xd.xdg_config_home = os.path.
+ xd.xdg_data_home = xd.xdg_config_home
+
import config
from cocos.director import director
Ah, la opcion de attach es visible solo despues de postear el bug. Bueno, adiciono el diff.