Merge pull request #70 from Phyxion/patch-1

Fixed InstallFolder exception
This commit is contained in:
Garry Newman 2017-10-11 19:21:40 +01:00 committed by GitHub
commit a3a4c87ede

View File

@ -114,7 +114,9 @@ public Client( uint appId )
SteamId = native.user.GetSteamID();
BetaName = native.apps.GetCurrentBetaName();
OwnerSteamId = native.apps.GetAppOwner();
InstallFolder = new DirectoryInfo( native.apps.GetAppInstallDir( AppId ) );
var appInstallDir = native.apps.GetAppInstallDir(AppId);
if (!String.IsNullOrEmpty(appInstallDir) && Directory.Exists(appInstallDir))
InstallFolder = new DirectoryInfo(appInstallDir);
BuildId = native.apps.GetAppBuildId();
CurrentLanguage = native.apps.GetCurrentGameLanguage();
AvailableLanguages = native.apps.GetAvailableGameLanguages().Split( new[] {';'}, StringSplitOptions.RemoveEmptyEntries ); // TODO: Assumed colon separated