diff options
author | Florian Bruhin <git@the-compiler.org> | 2016-08-02 14:08:28 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2016-08-02 14:23:38 +0200 |
commit | afde5bbc79d3186bd32dd0be0293445a3bf10557 (patch) | |
tree | 6a276276577b3fd69cdbd53729c70fbd0843f9c6 | |
parent | 66a76a45043fddeb2a873329fa0ab39dec2dc108 (diff) | |
download | qutebrowser-afde5bbc79d3186bd32dd0be0293445a3bf10557.tar.gz qutebrowser-afde5bbc79d3186bd32dd0be0293445a3bf10557.zip |
Fix using a relative path with --basedir
-rw-r--r-- | CHANGELOG.asciidoc | 44 | ||||
-rw-r--r-- | qutebrowser/utils/standarddir.py | 2 | ||||
-rw-r--r-- | tests/unit/utils/test_standarddir.py | 10 |
3 files changed, 55 insertions, 1 deletions
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 68098aad6..f5c96c1da 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -14,6 +14,50 @@ This project adheres to http://semver.org/[Semantic Versioning]. // `Fixed` for any bug fixes. // `Security` to invite users to upgrade in case of vulnerabilities. +v0.9.0 (unreleased) +------------------- + +Added +~~~~~ + +- New `:rl-backward-kill-word` command which does what `:rl-unix-word-rubout` + did before v0.8.0. +- New `:rl-unix-filename-rubout` command which is similar to readline's + `unix-filename-rubout`. +- New `fonts -> completion.category` setting to customize the font used for + completion category headers. + +Changed +~~~~~~~ + +- `:bookmark-add` now has a `--toggle` flag which deletes the bookmark if it + already exists. +- `:bookmark-load` now has a `--delete` flag which deletes the bookmark after + loading it. +- `:open` now also accepts quickmark names instead of URLs +- `:tab-move` now optionally takes an index for absolute moving. + +Fixed +----- + +- Fixed crash when using hints with JS disabled in some rare circumstances. +- When hinting input fields (`:t`), also consider input elements without a type. +- Fixed crash when opening an invalid URL with a percent-encoded and a real @ in it +- Fixed default `;o` and `;O` bindings +- Fixed local storage not working (and possible other bugs) when using a + relative path with `--basedir`. + +v0.8.1 +------ + +Fixed +~~~~~ + +- Fix crash when pressing enter without a command +- Adjust error message to point out QtWebEngine is unsupported with the OS + X .app currently. +- Hide Harfbuzz warning with the OS X .app + v0.8.1 ------ diff --git a/qutebrowser/utils/standarddir.py b/qutebrowser/utils/standarddir.py index 04c4c82a6..10929f251 100644 --- a/qutebrowser/utils/standarddir.py +++ b/qutebrowser/utils/standarddir.py @@ -168,7 +168,7 @@ def _from_args(typ, args): suffix = basedir_suffix[typ] except KeyError: # pragma: no cover return (False, None) - return (True, os.path.join(basedir, suffix)) + return (True, os.path.abspath(os.path.join(basedir, suffix))) try: argname = typ_to_argparse_arg[typ] diff --git a/tests/unit/utils/test_standarddir.py b/tests/unit/utils/test_standarddir.py index a04797258..de8d175bd 100644 --- a/tests/unit/utils/test_standarddir.py +++ b/tests/unit/utils/test_standarddir.py @@ -225,6 +225,15 @@ class TestArguments: func = getattr(standarddir, typ) assert func() == expected + def test_basedir_relative(self, tmpdir): + """Test --basedir with a relative path.""" + basedir = (tmpdir / 'basedir') + basedir.ensure(dir=True) + with tmpdir.as_cwd(): + args = types.SimpleNamespace(basedir='basedir') + standarddir.init(args) + assert standarddir.config() == str(basedir / 'config') + class TestInitCacheDirTag: @@ -311,6 +320,7 @@ class TestCreatingDir: m.sep = os.sep m.path.join = os.path.join m.path.exists.return_value = False + m.path.abspath = lambda x: x args = types.SimpleNamespace(basedir=str(tmpdir)) standarddir.init(args) |