Jump to content

Moving the Steam folder on Linux can cause users' entire file system to be deleted


Recommended Posts

Posted (edited)

:eek:

 

Sources: Github [1], [2]

 

Moved ~/.local/share/steam. Ran Steam. It deleted everything on system owned by user.

I am not sure what happened. I moved the folder in the title to a drive mounted under /media/user/BLAH and symlinked /home/user/.local/steam to the new location.

 

I launched Steam. It did not launch, it offered to let me browse, and still could not find it when I pointed to the new location. Steam crashed. I restarted it.

 

It re-installed itself and everything looked great. Until I looked and saw that Steam had apparently deleted everything owned by my user recursively from the root directory. Including my 3TB external drive I back everything up to that was mounted under /media.

 

Everything important, for the most part, was in the cloud. It is a huge hassle, but it is not a disaster. If there is the chance that moving your steam folder can result in recursively deleting everything in the directory tree you should probably just throw up an error instead of trying to point to other stuff. Or you know, allow the user to pick an install directory initially like on windows.

 

Normally, $STEAMROOT will contain a path without the leading slash (most likely), e.g. /home/joe/.local/Steam/Ubuntu_x86_64 -- The trailing slash guarantees that there IS a slash, because /home/joe/.local/Steam/Ubuntu_x86_64// is still a valid path (only LEADING double slashes are special). Normally, this would then call rm -rf /home/joe/.local/Steam/Ubuntu_x86_64/* or some such, but because $STEAMROOT can be empty, the expansion is thus rm -rf /* -- Not quite what we want to do here.
Edited by Arthur

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...