this post was submitted on 30 May 2026
61 points (93.0% liked)
Linux Gaming
26026 readers
331 users here now
Discussions and news about gaming on the GNU/Linux family of operating systems (including the Steam Deck). Potentially a $HOME away from home for disgruntled /r/linux_gaming denizens of the redditarian demesne.
This page can be subscribed to via RSS.
Original /r/linux_gaming pengwing by uoou.
No memes/shitposts/low-effort posts, please.
Resources
Help:
- ProtonDB
- Are We Anticheat Yet?
- r/linux_gaming FAQ
- Fork of an earlier version of the above
- PCGamingWiki
- LibreGameWiki
Launchers/Game Library Managers:
General:
Discord:
IRC:
Matrix:
Telegram:
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It's not dangerous in this case, if $tmpdir was unset, all that would happen is
rm -r $tempdircomplaining about a missing operand. The only issue I can see this causing is that ifmktemp -dfailsrmwould print an unhelpful error message. Usingrm -rfinstead would hide it, so could could checking the variable and conditionally runningrm -r, as you suggested.Scripts and programs are edited all the time, either by its original author or for modifications when downloaded. Maybe the original author forgot something when editing and suddenly its no longer safe. Or $tempdir isn't a unique name, meaning at different places (be it copy paste) could manipulate the global variable. Human errors happen all the time. Better do check in place, instead hoping that this stays safe. Alternatively create a tempdir with a fixed part in name, like "${tempdir}_protonge".