Przeglądaj źródła

Merge pull request #4144 from step21/1.1-maint

misc backports to 1.1-maint
TW 6 lat temu
rodzic
commit
b2f887e4b3

+ 2 - 2
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:

+ 1 - 1
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 '

+ 2 - 2
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)

+ 1 - 1
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

+ 1 - 1
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=(