proton-launch.sh fix finding proton when paths have spaces (#1222)

Co-authored-by: rawdatafeel <108900299+rawdatafeel@users.noreply.github.com>
This commit is contained in:
BrettMayson 2024-05-09 22:11:45 -06:00 committed by GitHub
parent d6467d5cce
commit f1acb03663
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -173,13 +173,13 @@ main () {
# shellcheck disable=SC2207
steamPaths=()
# Make sure all paths are valid directories
for p in $( grep path "${steamLibraryFolders}" | awk '{print $2}' | sed 's|\"||g' ); do
while IFS= read -r p; do
if [ -d "${p}" ]; then
steamPaths+=("${p}")
else
echo "INFO: ${steamLibraryFolders} contains invalid directory ${p}." >> "${LOGFILE}"
fi
done
done < <(grep path "${steamLibraryFolders}" | awk -F '"' '{print $4}' | sed 's|\"||g')
# Exit if there are no paths found.
if [[ "${#steamPaths[@]}" -eq 0 ]]; then