chenall/grub4dos

grub4dos: \ character is converted to \\ when calling grub.exe from grub2

steve6375 opened this issue · 3 comments

image

menuentry "Test file \A B\t.iso" --class=custom {
set cmd="set I=/A\ B/t.iso; pause %I%"
linux16 (hd0,1)/grub.exe --config-file=${cmd};
}

If specifying a grub4dos path containing spaces, an extra \ character is added which causes the filename to be wrong.

Maybe - is there any way to prevent it?

set cmd="set I=/A\ B/t.iso; echo !BAT > (md)0x300+1;echo -e set I=%I% >> (md)0x300+1; call (md)0x300+1; find --set-root %I%; map %I% (0xff);map --hook;chainloader (0xff);boot"
linux16 (hd0,1)/grub.exe --config-file=${cmd};

This will convert \\ to \ and seems to work.