From f64f432e513d35b82e03ca47b84f46e591e6d8fa Mon Sep 17 00:00:00 2001 From: Patrick Goering Date: Sat, 8 Apr 2017 17:10:02 +0200 Subject: [PATCH] catch exception for os.link when hardlinks are not supported --- src/borg/repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/repository.py b/src/borg/repository.py index 47a520157..b6340c4ac 100644 --- a/src/borg/repository.py +++ b/src/borg/repository.py @@ -190,7 +190,7 @@ def save_config(self, path, config): try: os.link(config_path, old_config_path) except OSError as e: - if e.errno in (errno.EMLINK, errno.EPERM): + if e.errno in (errno.EMLINK, errno.ENOSYS, errno.EPERM): logger.warning("Hardlink failed, cannot securely erase old config file") else: raise