]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
grub-install: Fix inverted test for NLS enabled when copying locales
authorMartin Whitaker <fsf@martin-whitaker.me.uk>
Mon, 25 May 2020 19:02:10 +0000 (21:02 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 18 Sep 2020 19:17:07 +0000 (21:17 +0200)
Commit 3d8439da8 (grub-install: Locale depends on nls) attempted to avoid
copying locale files to the target directory when NLS was disabled.
However the test is inverted, and it does the opposite.

Signed-off-by: Martin Whitaker <fsf@martin-whitaker.me.uk>
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
util/grub-install-common.c

index 0295d40f5e4834704311803741f4e0ebf82e06d2..277eaf4e25c0564e5d4a97bf54e5e6df6df88c55 100644 (file)
@@ -598,7 +598,7 @@ copy_all (const char *srcd,
   grub_util_fd_closedir (d);
 }
 
-#if !(defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS)
+#if (defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS)
 static const char *
 get_localedir (void)
 {
@@ -659,7 +659,7 @@ static void
 grub_install_copy_nls(const char *src __attribute__ ((unused)),
                       const char *dst __attribute__ ((unused)))
 {
-#if !(defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS)
+#if (defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS)
   char *dst_locale;
 
   dst_locale = grub_util_path_concat (2, dst, "locale");