# HG changeset patch # User Christian Brabandt # Date 1697445007 -7200 # Node ID 1f154b010b6693f5e938dfc9b4c2cd2cd9a86b37 # Parent 0c36813bed95bb9ca96f52daf56a05ab22f07e68 patch 9.0.2034: don't try to copy SMACK attribute, when none exist Commit: https://github.com/vim/vim/commit/5a679b2263f597950f99c60a99d4d1a192e9f639 Author: Christian Brabandt Date: Mon Oct 16 10:17:13 2023 +0200 patch 9.0.2034: don't try to copy SMACK attribute, when none exist Problem: don't try to copy SMACK attribute, when none exist Solution: return early if SMACK extended attributes do not exist or if they are not supported closes: #1711 closes: #13348 Signed-off-by: Christian Brabandt diff --git a/src/os_unix.c b/src/os_unix.c --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3047,6 +3047,11 @@ mch_copy_sec(char_u *from_file, char_u * if (from_file == NULL) return; + size = listxattr((char *)from_file, NULL, 0); + // not supported or no attributes to copy + if (errno == ENOTSUP || size == 0) + return; + for (index = 0 ; index < (int)(sizeof(smack_copied_attributes) / sizeof(smack_copied_attributes)[0]) ; index++) { diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2034, +/**/ 2033, /**/ 2032,