Linux ubuntu replaced my files with broken links

bignickel

Mad Mod Poet God
Joined
Aug 14, 2002
Messages
3,365
Location
Somewhere, USA
Every file in my Save games folders has the same file name as before, but they're only 90btyes or less and type Link (broken). I don't know how the heck this happened, and I've searched my computer to see where these files could possibly be. I did a test save game which saved fine in that folder, and looks good, but all the other files in their folders are all 90 bytes now and all broken links

Any ideas? I tried "restore previous", but evidently that's if you set that up in advance.

This is where one 'link' is pointing to:
/home/bignickel/.local/share/games/star-wars-kotor-2/./saves/000006 - Game5/Screen.tga
 
Have you tried looking in the directory the link is pointing to? You will need to enable show hidden files in the file manager.

Also I suspect if you look at the properties of the new save file you will find out that is also a link, but the destination is valid.
 
I'm awaiting a reply on some Ubuntu forums page I found.

The link is pointing right back at itself, except for the "/./" in the middle of the link, which makes no sense.

I've kind of liked using Linux a bit for the last few years but dang: don't know how much I can trust a system that replaces whole groups of folder contents with broken links. Just wish I found some page that had an explanation.
 
I've kind of liked using Linux a bit for the last few years but dang: don't know how much I can trust a system that replaces whole groups of folder contents with broken links. Just wish I found some page that had an explanation.

Can't be a Linux fault. Only MS screws things up by itself. :D

I know this is no help to you, it just had to be said......................:boxedin:
 
Last edited:
Sounds weird from the get-go if I'm understanding it correctly. Instead of your files all being on your own hard drive, everything is only stored in the cloud? That's sounds ripe for the kind of extortion Photobucket pulled.

Are they asking you to upgrade your services to get your links back? Or maybe it's like when the forum is down, there's a screwup but they are working to fix it.

Feel free to tell me I don't get what's going on at all. It's very likely I don't.
 
What? No.

There are no files on any cloud. Was playing the game fine, and some process or something or other screwed up all the files. I'm figuring that all that's left is the pointers to the files in the directory. I dunno. None of my Linux friends have an explanation, except that it's not Linux software I'm running (its Windows software running via wine), and that's not the safest thing.

Guess I could get a Windows 7 installed on some laptop, or just keep backing up the game files
 
Not that it would help you getting your saved games back, this look like Wine borked the translation of Win/DOS paths to *nix-style paths. The "/home/usr/etc." is the *nix path to your game, the "/./" comes from the "c:\" within the game, followed by the game Win/DOS path from within the game with the "\"s changed to "/"s. DOS/Win does also know a construction using "\\.\" for directing output to a device or port that's not necessarily a drive, like "\\.\COM1" to a serial port (which, e.g., may have a printer or so attached), so maybe the "/./" comes from something like that (that the simple DOS2*nix path translator couldn't handle because no one thought it could happen).

Did something crash while you were saving or accessing the saved files folder?

ETA: You can specify "/./" within a complex *nix path structure as short for "working directory" when the path is sent to a command, though it should not appear as an actual path within your file structure as such. Also, In Win/DOS you CAN use "/" as a directory separator, but it can be submitted as "./" to separate it from the command line option "/". In short, there are multiple possibilities where this comes from when something did not work as intended.

I notice that there are spaces in the last part of your saved games path. Did you type them in? If so, that could be something that borks the path translator (been there, had that while writing simple macros. For the longest time, we had to avoid using spaces in that macro. Even after I updated the macro to handle them, it did not always work. The app in question came originally from Mac, and continued using Mac style paths internally in the Windows version, and had to call an external DOS command to convert files).
 
Last edited:
It would help to do a detail listing of those files in the terminal:

Code:
ls -l #this "l" is lowercase "L" 
...

drwx------ 4 donn donn 4096 Jun 17 22:42 ./
drwx------ 4 donn donn 4096 Oct 11  2016 ../
lrwxrwxrwx 1 donn donn   54 Oct 12  2016 wifisetup -> /home/donn/wifisetup/
lrwxrwxrwx 1 donn donn   48 Oct 11  2016 games -> /home/donn/bins/games/

This way you can see where the link is pointing. The little "l" at the front shows it's a link.

Then you can go to that place and see if your files are there. As it's reporting broken links, they probably won't be, but it may be the directory name has changed, or it's been set to read only under another user. Worth a look.
 
I can do that but like I said already: the link is pointing back at its own location

Tried finding some program that could analyze the drive: knoffix or whatever it was called gave up with "can't mount MNT drive" or something when I booted with it.

Tried scalpel but it never could find the drive

If anyone knows of a GUI based program that could recover files I'm all ears
 
Last edited:
Since these are game save files, what was the last thing you did in the game and what error are you getting now from that game?
 
I can do that but like I said already: the link is pointing back at its own location

Tried finding some program that could analyze the drive: knoffix or whatever it was called gave up with "can't mount MNT drive" or something when I booted with it.

Tried scalpel but it never could find the drive

If anyone knows of a GUI based program that could recover files I'm all ears


Dude. Next time. Hackintosh.
 
What? No.

There are no files on any cloud. Was playing the game fine, and some process or something or other screwed up all the files. I'm figuring that all that's left is the pointers to the files in the directory. I dunno. None of my Linux friends have an explanation, except that it's not Linux software I'm running (its Windows software running via wine), and that's not the safest thing.

Guess I could get a Windows 7 installed on some laptop, or just keep backing up the game files
It's most likely not an Ubuntu thing then as you say you're running WINE with MS software. Have you looked at any WINE forums yet? They'd be the go-to if it were me because that's the environment in which you're having troubles.
 
None of my Linux friends have an explanation, except that it's not Linux software I'm running (its Windows software running via wine), and that's not the safest thing.
It's not even that: it's windows software running via wine running via a package some dude put together on a forum to specially configure the environment.

A) Try doing what Donn asked, first. Ubuntu might think the files are broken links to themselves, but this'll tell you their size and other details to determine what exactly they are.

B) Based on looking at the install script in the thread where you were setting this up, I'm pretty sure the files are still in /usr/whatever/games and have only ever been linked to from your home directory. If the "broken links" really are broken links, and not actual files that got corrupted somehow, that would be my next thing to check.
 
Also, if you can no longer mount or find the drive, I think your drive be dead. :(

Try "gnome-disks". In Unity, open the run dialogue and search for "Disks", or from the terminal, run gnome-disks

It's very useful for mounting, formatting and so on. See if your drive shows there. If it does, select it and look for the hamburger menu in the top-right and look for the SMART test option. A test could diagnose problems.
 
How many drives do you have? Were you saving your games to another drive?Is the drive with your OS on it nearly full. If I max out my OS drive it will make my second drive disappear until I free up some space.
 
As I said , the links pointed at themselves; I never said my drive wasn't mounting or that I had more than one

In any case I decided to shell out 2.49 for the steam version and started over . Working well and it has the missing wall textures displaying , plus graphics seems a littler sweeter

Guess when it comes to wine I have to remember to back up my saves
 
As I said , the links pointed at themselves; I never said my drive wasn't mounting or that I had more than one

In any case I decided to shell out 2.49 for the steam version and started over . Working well and it has the missing wall textures displaying , plus graphics seems a littler sweeter

Guess when it comes to wine I have to remember to back up my saves


True, but you didn't include very many details either so we have to whittle it down by process of elimination. Reading back over your OP-if the saved version was only 90 bytes or less, was it just making an alias of the file and saving the actual file somewhere else?
 

Back
Top Bottom