diff --git a/scriptmodules/supplementary/runcommand/runcommand.sh b/scriptmodules/supplementary/runcommand/runcommand.sh index 3d9fe45d13..2b7a72b373 100755 --- a/scriptmodules/supplementary/runcommand/runcommand.sh +++ b/scriptmodules/supplementary/runcommand/runcommand.sh @@ -1103,7 +1103,7 @@ function retroarch_append_config() { fi # set `libretro_directory` to the core parent folder - local core_dir=$(echo "$COMMAND" | grep -Eo " $ROOTDIR/libretrocores/.*libretro\.so " | head -n 1) + local core_dir=$(echo "$COMMAND" | grep -Eo "$ROOTDIR/libretrocores/.*libretro\.so" | head -n 1) core_dir=$(dirname "$core_dir") [[ -n "$core_dir" ]] && iniSet "libretro_directory" "$core_dir"