scottrice / Ice

Application to automatically add ROMs to Steam
http://scottrice.github.io/Ice/
MIT License
835 stars 96 forks source link

ICE Removed my PSP emulator shortcuts from Steam #109

Closed ghost closed 10 years ago

ghost commented 10 years ago

Hi Scotty and co.

Recently Steam updated and disapeared with a couple of images from ICE shortcuts, so I reran it and during the process of redownloading those covers it deleted all my PSP shortcuts, but not the custom shortcuts for standalone games (Starcraft II and stuff). I think this could be due to the fact that I left my ppsspp emulator under ICE's folder with the rest of the other emulators, I don't know.

scottrice commented 10 years ago

Would you mind pasting the contents of emulators.txt and consoles.txt?

ghost commented 10 years ago

Uh, where are those? In terms of emulator configuration I only have a config.txt file.

scottrice commented 10 years ago

Oh wait, I see what happened here. You are exactly right on your reasoning as well. I will fix this bug at the first opportunity.

ghost commented 10 years ago

Uh, what happened?

scottrice commented 10 years ago

Ice doesn't just add ROMs, it 'syncs' them. As in, if you add a game to Steam using Ice, then remove the ROM file, Ice will get rid of the Steam shortcut that it created for that game. It also has to keep in mind shortcuts that were made that don't use Ice, and avoid removing those. So the flow for Ice when syncing games is something like this

  1. Get a list of all ROMs currently in the ROMs directory
  2. Figure out which shortcuts were added by Ice
  3. Remove any shortcuts that were added by Ice but no longer exist in the ROMs list

The problem you are having is at step 2. To determine whether a shortcut is made by Ice, and not just a random shortcut that the user added to Steam, Ice checks whether the shortcut refers to the ROMs directory. As you have shown, this is not exactly perfect, as the ROMs directory should be a safe place to put ROMs that aren't managed by Ice.

The fix for this is to make the logic to determine whether a shortcut is managed by Ice much more robust. Specifically, I will make it so that only the subfolders referenced by consoles count as 'managed by ice', not just the catchall ROMs folder.

ghost commented 10 years ago

I see. I didn't realised it was grabbing everything under the ROMs folder, I thought it was searching for specific folders. Well, thanks, Scott.