Codeusa / SteamCleaner

:us: A PC utility for restoring disk space from various game clients like Origin, Steam, Uplay, Battle.net, GoG and Nexon :us:
https://andrew.im/
GNU General Public License v3.0
1.97k stars 96 forks source link

Battlenet analyzer path #25

Closed stephen-moyer closed 8 years ago

stephen-moyer commented 8 years ago

It looks like the product path won't work, you do this: var productPath = GetBattleNetPath() + GetProductDbPath();

but GetProductDbPath already does this:

private string GetProductDbPath() 
{
    return Path.Combine(GetBattleNetPath(), "\\Agent\\product.db");
}
andrewmd5 commented 8 years ago

So here is some weird behavior

Using the getProducDb path alone

Fixed by doing

  return Path.Combine(GetBattleNetPath(),
                "Agent\\product.db");

Instead, seems Path.Combine will always return the second argument is it begins with \, / or \ literal.

We learn something new every day.