move application data
Status: Alpha
Brought to you by:
aristus
On Mac at least, it's not so hot to store application data in $HOME
directly. Certainly also on other platforms there are better places
to store this. Can I suggest, on Mac at least, to move the data files
into ~/Library/Application Support/dowser/<blah> ? The relevant
lines are in db.py, db_sqllite.py and utils.py.
There's a similar folder on Windows, and perhaps linux bods might
prefer $HOME/.dowser/<blah>
Good work tho!
Logged In: YES
user_id=995902
I chose $HOME out of convenience and cross-platformness, but this is an
insightful suggestion. I actually consider the data to be Documents, but
there you go. If anyone has more ideas, add a comment to this tick.
Windows Developer reaction: "Eh, it's already released. Forget it." (After
heavy pressure from big clients, Version 2.0 ships with a backwards-
incompatible conversion tool.)
Linux Developer reaction: "D00d! I should totally make an option for that
on the prefs pane!"
Apple Developer reaction: Silence, followed by denial a problem exists
mixed with insinuations that if there IS a problem it must be the user's
fault. Version 2.0 quietly fixes the alleged problem.
Logged In: NO
I think you can check with python on what platform you
are... OSX to Library/<what ever>... on windows to somewhere
else and for all other to $HOME/.dowser/
(me not the original bug submitter)
Logged In: YES
user_id=174914
For 0.26:
$ diff db.py
351c351
< util.mkdir(util.home + '/Library/Application
Support/dowser/cache/' + rdomain + path)
---
> util.mkdir(util.home + '/dowser/cache/' + rdomain +
path)
353c353
< return '/Library/Application Support/dowser/cache/'
+ rdomain + path
---
> return '/dowser/cache/' + rdomain + path
$ diff db_sqlite.py db_sqlite.old.py
34c34
< dbfile = util.home + "/Library/Application
Support/dowser/library.db"
---
> dbfile = util.home + "/dowser/library.db"
36c36
< util.mkdir(util.home + "/Library/Application
Support/dowser")
---
> util.mkdir(util.home + "/dowser")
$ diff util.py util.old.py
301,302c301,302
< mkdir(home + "/Library/Application Support/dowser")
< preffile = home + '/Library/Application
Support/dowser/prefs.pickle'
---
> mkdir(home + "/dowser")
> preffile = home + '/dowser/prefs.pickle'
Logged In: YES
user_id=174914
An excellent first step might be to consolidate this
information into one "getDataDir()" function somewhere,
rather than appending /dowser to $HOME in multiple places.