Skip to content

Commit c477a95

Browse files
akhuettelDaniel Kiper
authored andcommitted
util/grub-install: Allow recursive copying of theme dirs
grub-install allows to pass a parameter to install a theme in the boot partition. This works fine for the default starfield theme. However, in general themes can contain subdirectories, as, e.g. "icons", and these are not copied by grub-install. As a result, the icons are missing on the screen. Fix this by simple recursive copying. Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1 parent f551d3d commit c477a95

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

util/grub-install-common.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,13 +803,20 @@ copy_all (const char *srcd,
803803
|| strcmp (de->d_name, "..") == 0)
804804
continue;
805805
srcf = grub_util_path_concat (2, srcd, de->d_name);
806-
if (grub_util_is_special_file (srcf)
807-
|| grub_util_is_directory (srcf))
806+
if (grub_util_is_special_file (srcf))
808807
{
809808
free (srcf);
810809
continue;
811810
}
812811
dstf = grub_util_path_concat (2, dstd, de->d_name);
812+
if (grub_util_is_directory (srcf))
813+
{
814+
grub_install_mkdir_p (dstf);
815+
copy_all (srcf, dstf);
816+
free (srcf);
817+
free (dstf);
818+
continue;
819+
}
813820
grub_install_compress_file (srcf, dstf, 1);
814821
free (srcf);
815822
free (dstf);

0 commit comments

Comments
 (0)