mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
reflink: osx: check that not older than High Sierra
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -36,6 +36,13 @@ class System(object):
|
||||
@staticmethod
|
||||
def _reflink_darwin(src, dst):
|
||||
import ctypes
|
||||
import platform
|
||||
|
||||
version = platform.mac_ver()[0]
|
||||
major, minor, patch = version.split('.')
|
||||
# Starting from High Sierra
|
||||
if major < 10 or (major == 10 and minor < 13):
|
||||
return -1
|
||||
|
||||
clonefile = ctypes.CDLL('libc.dylib').clonefile
|
||||
clonefile.argtypes = [ctypes.c_char_p,
|
||||
|
||||
Reference in New Issue
Block a user