diff --git a/Duplicati/Library/Snapshots/SystemIOLinux.cs b/Duplicati/Library/Snapshots/SystemIOLinux.cs index 2d2267760..bd3395495 100644 --- a/Duplicati/Library/Snapshots/SystemIOLinux.cs +++ b/Duplicati/Library/Snapshots/SystemIOLinux.cs @@ -173,10 +173,12 @@ namespace Duplicati.Library.Snapshots public Dictionary GetMetadata(string file) { var f = file.EndsWith(DIR_SEP) ? file.Substring(0, file.Length - 1) : file; - var n = UnixSupport.File.GetExtendedAttributes(f); var dict = new Dictionary(); - foreach(var x in n) - dict["unix-ext:" + x.Key] = Convert.ToBase64String(x.Value); + + var n = UnixSupport.File.GetExtendedAttributes(f); + if (n != null) + foreach(var x in n) + dict["unix-ext:" + x.Key] = Convert.ToBase64String(x.Value); var fse = UnixSupport.File.GetUserGroupAndPermissions(f); dict["unix:uid-gid-perm"] = string.Format("{0}-{1}-{2}", fse.UID, fse.GID, fse.Permissions); diff --git a/thirdparty/UnixSupport/File.cs b/thirdparty/UnixSupport/File.cs index 0fd2d1d0e..f96152201 100644 --- a/thirdparty/UnixSupport/File.cs +++ b/thirdparty/UnixSupport/File.cs @@ -190,7 +190,14 @@ namespace UnixSupport string[] values; var size = SUPPORTS_LLISTXATTR ? Mono.Unix.Native.Syscall.llistxattr(path, out values) : Mono.Unix.Native.Syscall.listxattr(path, out values); if (size < 0) + { + // In case the underlying filesystem does not support extended attributes, + // we simply return that there are no attributes + if (Syscall.GetLastError() == Errno.EOPNOTSUPP) + return null; + throw new FileAccesException(path, "llistxattr"); + } var dict = new Dictionary(); foreach(var s in values) diff --git a/thirdparty/UnixSupport/UnixSupport.dll b/thirdparty/UnixSupport/UnixSupport.dll index 4dac8d3d3..da54cd4de 100755 Binary files a/thirdparty/UnixSupport/UnixSupport.dll and b/thirdparty/UnixSupport/UnixSupport.dll differ