diff --git a/conftest.py b/conftest.py index cc428be1f..6fd596104 100644 --- a/conftest.py +++ b/conftest.py @@ -30,8 +30,8 @@ from borg import xattr @pytest.fixture(autouse=True) def clean_env(tmpdir_factory, monkeypatch): # avoid that we access / modify the user's normal .config / .cache directory: - monkeypatch.setenv('XDG_CONFIG_HOME', tmpdir_factory.mktemp('xdg-config-home')) - monkeypatch.setenv('XDG_CACHE_HOME', tmpdir_factory.mktemp('xdg-cache-home')) + monkeypatch.setenv('XDG_CONFIG_HOME', str(tmpdir_factory.mktemp('xdg-config-home'))) + monkeypatch.setenv('XDG_CACHE_HOME', str(tmpdir_factory.mktemp('xdg-cache-home'))) # also avoid to use anything from the outside environment: keys = [key for key in os.environ if key.startswith('BORG_')] for key in keys: diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 279194c1b..62b9b82b2 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -2674,7 +2674,7 @@ class Archiver: if tag_files: add_option('--exclude-caches', dest='exclude_caches', action='store_true', help='exclude directories that contain a CACHEDIR.TAG file ' - '(http://www.brynosaurus.com/cachedir/spec.html)') + '(http://www.bford.info/cachedir/spec.html)') add_option('--exclude-if-present', metavar='NAME', dest='exclude_if_present', action='append', type=str, help='exclude directories that are tagged by containing a filesystem object with ' diff --git a/src/borg/helpers.py b/src/borg/helpers.py index aceaaf31a..bae8a0a70 100644 --- a/src/borg/helpers.py +++ b/src/borg/helpers.py @@ -516,7 +516,7 @@ def get_cache_dir(): fd.write(textwrap.dedent(""" # This file is a cache directory tag created by Borg. # For information about cache directory tags, see: - # http://www.brynosaurus.com/cachedir/ + # http://www.bford.info/cachedir/spec.html """).encode('ascii')) return cache_dir @@ -594,7 +594,7 @@ def dir_is_cachedir(path): """Determines whether the specified path is a cache directory (and therefore should potentially be excluded from the backup) according to the CACHEDIR.TAG protocol - (http://www.brynosaurus.com/cachedir/spec.html). + (http://www.bford.info/cachedir/spec.html). """ tag_path = os.path.join(path, CACHE_TAG_NAME) diff --git a/src/borg/shellpattern.py b/src/borg/shellpattern.py index f71c3b9ce..899544975 100644 --- a/src/borg/shellpattern.py +++ b/src/borg/shellpattern.py @@ -62,4 +62,4 @@ def translate(pat, match_end=r"\Z"): else: res += re.escape(c) - return res + match_end + "(?ms)" + return "(?ms)" + res + match_end diff --git a/src/borg/testsuite/key.py b/src/borg/testsuite/key.py index 6a7a6c8d7..bb6b7ce35 100644 --- a/src/borg/testsuite/key.py +++ b/src/borg/testsuite/key.py @@ -67,7 +67,7 @@ class TestKey: @pytest.fixture def keys_dir(self, request, monkeypatch, tmpdir): - monkeypatch.setenv('BORG_KEYS_DIR', tmpdir) + monkeypatch.setenv('BORG_KEYS_DIR', str(tmpdir)) return tmpdir @pytest.fixture(params=(