]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
commands/ls: Output path for single file arguments given with path
authorGlenn Washburn <development@efficientek.com>
Sun, 2 Mar 2025 05:15:35 +0000 (23:15 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 5 Mar 2025 20:24:48 +0000 (21:24 +0100)
Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/commands/ls.c

index 1b447acf7c34daea7c78eff3dbab25fbf379525a..886441575cacff5d74643a3262f8c6aedea19577 100644 (file)
@@ -108,6 +108,8 @@ print_file (const char *filename, const struct grub_dirhook_info *info,
 
   if (! ctx->longlist)
     {
+      if (ctx->filename != NULL)
+       grub_xputs (ctx->dirname);
       grub_printf ("%s%s ", filename, info->dir ? "/" : "");
       return 0;
     }