diff --git a/README.md b/README.md index a16aa20..60f32d6 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/buku.1 b/buku.1 index 0c43d2e..998a44d 100644 --- a/buku.1 +++ b/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 diff --git a/buku.py b/buku.py index 8a207a9..5cc7285 100755 --- a/buku.py +++ b/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: