Changed the Buku path on Windows to what other people think is right (#153)
This commit is contained in:
parent
abac8d016b
commit
44760fe035
@ -237,7 +237,7 @@ SYMBOLS:
|
||||
- The database file is stored in:
|
||||
- **$XDG_DATA_HOME/buku/bookmarks.db**, if XDG_DATA_HOME is defined (first preference) or
|
||||
- **$HOME/.local/share/buku/bookmarks.db**, if HOME is defined (second preference) or
|
||||
- **%USERPROFILE%\buku\bookmarks.db**, if you are on Windows or
|
||||
- **%APPDATA%\buku\bookmarks.db**, if you are on Windows or
|
||||
- **$PWD** on both Windows and non-Windows systems.
|
||||
- If the URL contains characters like `;`, `&` or brackets they may be interpreted specially by the shell. To avoid it, add the URL within single or double quotes (`'`/`"`).
|
||||
- URLs are unique in DB. The same URL cannot be added twice.
|
||||
|
2
buku.1
2
buku.1
@ -28,7 +28,7 @@ is a command-line utility to store, tag, search and organize bookmarks.
|
||||
The database file is stored in:
|
||||
- \fI$XDG_DATA_HOME/buku/bookmarks.db\fR, if XDG_DATA_HOME is defined (first preference) or
|
||||
- \fI$HOME/.local/share/buku/bookmarks.db\fR, if HOME is defined (second preference) or
|
||||
- \fI%USERPROFILE%\buku\bookmarks.db\fR, if you are on Windows or
|
||||
- \fI%APPDATA%\buku\bookmarks.db\fR, if you are on Windows or
|
||||
- \fI$PWD\fR on both Windows and non-Windows systems.
|
||||
.PP
|
||||
.IP 2. 4
|
||||
|
4
buku.py
4
buku.py
@ -352,7 +352,7 @@ class BukuDb:
|
||||
@staticmethod
|
||||
def get_default_dbdir():
|
||||
'''Determine the directory path where dbfile will be stored:
|
||||
if the platform is Windows, use %USERPROFILE%
|
||||
if the platform is Windows, use %APPDATA%
|
||||
else if $XDG_DATA_HOME is defined, use it
|
||||
else if $HOME exists, use it
|
||||
else use the current directory
|
||||
@ -361,7 +361,7 @@ class BukuDb:
|
||||
'''
|
||||
|
||||
if sys.platform == 'win32':
|
||||
data_home = os.environ.get('USERPROFILE')
|
||||
data_home = os.environ.get('APPDATA')
|
||||
if data_home is None:
|
||||
return os.path.abspath('.')
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user