mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-12-21 15:21:52 +01:00
attempted fix on steamid
This commit is contained in:
parent
d80661d3d1
commit
03b64c8676
@ -2554,29 +2554,33 @@ export PYTHONPATH="${download_dir}/lib/python${python_version}/site-packages/:$P
|
|||||||
# Set the default Steam directory
|
# Set the default Steam directory
|
||||||
steam_dir="${logged_in_home}/.local/share/Steam"
|
steam_dir="${logged_in_home}/.local/share/Steam"
|
||||||
|
|
||||||
|
|
||||||
# Check if the loginusers.vdf file exists
|
# Check if the loginusers.vdf file exists
|
||||||
if [[ -f "${logged_in_home}/.steam/root/config/loginusers.vdf" ]]; then
|
if [[ -f "${logged_in_home}/.steam/root/config/loginusers.vdf" ]]; then
|
||||||
# Extract the block of text for the most recent user
|
# Extract the block of text for the most recent user
|
||||||
most_recent_user=$(sed -n '/"users"/,/"MostRecent" "1"/p' "${logged_in_home}/.steam/root/config/loginusers.vdf")
|
most_recent_user=$(sed -n '/"users"/,/"MostRecent" "1"/p' "${logged_in_home}/.steam/root/config/loginusers.vdf")
|
||||||
|
|
||||||
# Extract the SteamID from the block of text for the most recent user
|
# Extract the SteamIDs from the block of text for the most recent user
|
||||||
steamid=$(echo "$most_recent_user" | grep -o '[0-9]\{17\}')
|
steamids=$(echo "$most_recent_user" | grep -o '[0-9]\{17\}')
|
||||||
|
|
||||||
# Convert steamid to steamid3
|
# Loop over each SteamID
|
||||||
steamid3=$((steamid - 76561197960265728))
|
for steamid in $steamids; do
|
||||||
|
# Convert steamid to steamid3
|
||||||
|
steamid3=$((steamid - 76561197960265728))
|
||||||
|
|
||||||
# Initialize the userdata_folder variable
|
# Initialize the userdata_folder variable
|
||||||
userdata_folder=""
|
userdata_folder=""
|
||||||
|
|
||||||
# Directly map steamid3 to userdata folder
|
# Directly map steamid3 to userdata folder
|
||||||
userdata_folder="/home/deck/.steam/root/userdata/${steamid3}"
|
userdata_folder="/home/deck/.steam/root/userdata/${steamid3}"
|
||||||
|
|
||||||
# Check if userdata_folder exists
|
# Check if userdata_folder exists
|
||||||
if [[ -d "$userdata_folder" ]]; then
|
if [[ -d "$userdata_folder" ]]; then
|
||||||
echo "Found userdata folder for current user: $userdata_folder"
|
echo "Found userdata folder for user with SteamID $steamid: $userdata_folder"
|
||||||
else
|
else
|
||||||
echo "Could not find userdata folder for current user"
|
echo "Could not find userdata folder for user with SteamID $steamid"
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
else
|
else
|
||||||
echo "Could not find loginusers.vdf file"
|
echo "Could not find loginusers.vdf file"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user