Do not force absolute-path handling for networking reasons

This commit is contained in:
Eric Torres 2019-04-23 22:55:54 -07:00
parent 6c1733bcc9
commit 72ad40e53b
3 changed files with 1 additions and 11 deletions

View File

@ -69,9 +69,6 @@ Implementation Notes
--------------------
* pathlib is used for path handling
* Absolute paths are used internally for consistency
* When hardlinking, rbackup passes the entire path to avoid needing relative paths
* The backup script changes the process umask to 0000

View File

@ -40,7 +40,7 @@ class Hierarchy(PathLike):
:type dest: str or path-like object
:raises PermissionError: if process does not have permission to write at dest
"""
self._path = Path(dest).resolve()
self._path = Path(dest)
self._metadata_path = self._path / ".metadata"
self._name = self._path.name

View File

@ -30,13 +30,6 @@ class TestHierarchyPaths(unittest.TestCase):
def test_retrieves_correct_metadata_filename(self):
self.assertEqual(Hierarchy("/tmp/backup").metadata_path.name, ".metadata")
@given(from_regex(r"[\w/._-]+", fullmatch=True))
def test_returns_absolute_path(self, dest):
try:
self.assertTrue(Hierarchy(dest).path.is_absolute())
except PermissionError:
pass
def test_raises_notimplemented_error(self):
h = Hierarchy("/tmp/backup")
with self.assertRaises(NotImplementedError):