valters-tomsons / Spectabis

A modern PCSX2 Frontend.
https://spectabis.github.io/
GNU General Public License v3.0
114 stars 18 forks source link

DirectoryNotFoundException if ini folders do not exist #20

Closed StatelySquirrel closed 3 years ago

StatelySquirrel commented 6 years ago

On a fresh install, I received DirectoryNotFoundExceptions when attempting to add games. Checking the source revealed that in Spectabis_WPF.Domain.GameProfile.Create(...) (currently GameDiscovery.xaml.cs:55), you're checking to see if one of two directories exist:

1) an 'inis' folder inside the pcsx2 directory, or else 2) a 'PCSX2\inis' folder in the user's documents directory

If neither of these locations exist, the app crashes. I suggest either a graceful fail with an explanation presented to the user or simply yes/no dialog allowing the user to create one of these folders.