From 1dafbd83616e469460b57de652616f368cbb5b91 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sun, 13 Dec 2020 02:29:26 +0200 Subject: [PATCH] system: _reflink_darwin: use fsencode for path (#5085) Fixes #5083 --- dvc/system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dvc/system.py b/dvc/system.py index 1d7f0a9b5..4b00bd834 100644 --- a/dvc/system.py +++ b/dvc/system.py @@ -71,8 +71,8 @@ class System: clonefile.restype = ctypes.c_int return clonefile( - ctypes.c_char_p(src.encode("utf-8")), - ctypes.c_char_p(dst.encode("utf-8")), + ctypes.c_char_p(os.fsencode(src)), + ctypes.c_char_p(os.fsencode(dst)), ctypes.c_int(0), )