Skip to content

Commit 4a1314c

Browse files
committed
patch 7.4.1186
Problem: Error messages for security context are hard to translate. Solution: Use one string with %s. (Ken Takata)
1 parent 0d6f835 commit 4a1314c

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/os_unix.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2822,10 +2822,10 @@ mch_copy_sec(from_file, to_file)
28222822
ret = setxattr((char*)to_file, name, buffer, (size_t)size, 0);
28232823
if (ret < 0)
28242824
{
2825-
MSG_PUTS(_("Could not set security context "));
2826-
MSG_PUTS(name);
2827-
MSG_PUTS(_(" for "));
2828-
msg_outtrans(to_file);
2825+
vim_snprintf((char *)IObuff, IOSIZE,
2826+
_("Could not set security context %s for %s"),
2827+
name, to_file);
2828+
msg_outtrans(IObuff);
28292829
msg_putchar('\n');
28302830
}
28312831
}
@@ -2842,11 +2842,11 @@ mch_copy_sec(from_file, to_file)
28422842
case ERANGE:
28432843
default:
28442844
/* no enough size OR unexpected error */
2845-
MSG_PUTS(_("Could not get security context "));
2846-
MSG_PUTS(name);
2847-
MSG_PUTS(_(" for "));
2848-
msg_outtrans(from_file);
2849-
MSG_PUTS(_(". Removing it!\n"));
2845+
vim_snprintf((char *)IObuff, IOSIZE,
2846+
_("Could not get security context %s for %s. Removing it!"),
2847+
name, from_file);
2848+
msg_puts(IObuff);
2849+
msg_putchar('\n');
28502850
/* FALLTHROUGH to remove the attribute */
28512851

28522852
case ENODATA:

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,8 @@ static char *(features[]) =
746746

747747
static int included_patches[] =
748748
{ /* Add new patch number below this line */
749+
/**/
750+
1186,
749751
/**/
750752
1185,
751753
/**/

0 commit comments

Comments
 (0)