From f29bb69612a528b7ca05adda14a7e63ac2c6dc32 Mon Sep 17 00:00:00 2001 From: arvidn Date: Wed, 10 Jan 2018 23:05:50 +0100 Subject: [PATCH] fix error handling of unsupported hard-links --- ChangeLog | 2 ++ src/file.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c2bd5c25b..82868fdf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ + * fix error handling of unsupported hard-links + 1.1.6 release * deprecate save_encryption_settings (they are part of the normal settings) diff --git a/src/file.cpp b/src/file.cpp index 1374be743..a34c34902 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -568,7 +568,7 @@ namespace libtorrent // most errors are passed through, except for the ones that indicate that // hard links are not supported and require a copy. // TODO: 2 test this on a FAT volume to see what error we get! - if (errno != EMLINK || errno != EXDEV) + if (errno != EMLINK && errno != EXDEV) { // some error happened, report up to the caller ec.assign(errno, system_category());