10

The shellscript is very simple:

retroarch $* -c /tmp/retroarch/Data/retroarch/gambatte.cfg

("retroarch" is another shellscript)

If the filename passed contains spaces it fails:

RetroArch [ERROR] :: Could not read ROM file.
slm
  • 369,824
eadmaster
  • 1,643

2 Answers2

13

Use quotes.

Instead of

yourcommand some file.name

use

yourcommand "some file.name"

When using variables, quote them as well.

yourcommand "$filename"
yourcommand "$@"
...
frostschutz
  • 48,978
-1

In general you have to either escape the spaces with backslashes () or wrap the path in either single quotes (') or double quotes (").

$ retroarch "$*" -c /tmp/retroarch/Data/retroarch/gambatte.cfg
slm
  • 369,824