Closed stephen-moyer closed 8 years ago
So this actually makes paths like Hearthstone not be detected, the product.db has malformed paths, some start with ! or other strangers chars, because I don't know what database format the db is, im stripping all the unreadable content and attempting to detect valid paths.
I've attached my product.db for you
I had it detecting all those paths, but I don't think the old one was so I removed it, plus it was picking up the game executables. Are the installer packages supposed to be in the games directory?
They should be, however Battle.net is a lot better about cleaning up left over files. On occasion if the client exits before a complete install, they can be left over.
Looking at the old code it looks like it just looked for paths that start with \u0021 or \u001F then trimmed that first character and used that as the directory. I replaced this with just one regex that should work.
I tested this against my product.db and it was able to read the same paths as the last one. I just don't have any cached files or something because there's only the C:/ProgramData/Battle.net/Agent and C:/Program Files (x86)/Battle.net paths.