mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
reflink() doesn't take Path parameters
Fix `test_successful_reflink`, by passing the right kinds of parameters.
This was failing inside the reflink package:
```
/usr/lib/python3/dist-packages/reflink/reflink.py:34: in reflink
backend.clone(oldpath, newpath)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
oldpath = PosixPath('/tmp/tmpx3jirmhp/testfile')
newpath = PosixPath('/tmp/tmpx3jirmhp/testfile.dest')
def clone(oldpath, newpath):
if isinstance(oldpath, unicode):
oldpath = oldpath.encode(sys.getfilesystemencoding())
if isinstance(newpath, unicode):
newpath = newpath.encode(sys.getfilesystemencoding())
> newpath_c = ffi.new('char[]', newpath)
^^^^^^^^^^^^^^^^^^^^^^^^^^
E TypeError: expected new array length or list/tuple/str, not PosixPath
```
This commit is contained in:
parent
d446e10fb0
commit
4a17901c1d
1 changed files with 1 additions and 1 deletions
|
|
@ -579,7 +579,7 @@ class SafeMoveCopyTest(FilePathTestCase):
|
|||
|
||||
@NEEDS_REFLINK
|
||||
def test_successful_reflink(self):
|
||||
util.reflink(self.path, self.dest)
|
||||
util.reflink(str(self.path), str(self.dest))
|
||||
assert self.dest.exists()
|
||||
assert self.path.exists()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue