Create Steam file on first time running

This commit is contained in:
Jaex 2017-04-24 19:29:19 +03:00
parent e53275a3e9
commit 59397b8b98
4 changed files with 17 additions and 2 deletions

View file

@ -1207,5 +1207,10 @@ public static byte[] ComputeHMACSHA256(string data, byte[] key)
{
return ComputeHMACSHA256(Encoding.UTF8.GetBytes(data), key);
}
public static void CreateEmptyFile(string path)
{
File.Create(path).Dispose();
}
}
}

View file

@ -125,5 +125,10 @@ public static bool IsCommandExist(string[] args, string command)
return false;
}
public static void CreateEmptyFile(string path)
{
File.Create(path).Dispose();
}
}
}

View file

@ -165,9 +165,14 @@ private static void DoUpdate()
}
// In case updating terminate middle of it, in next Launcher start it can repair
File.Create(UpdatingTempFilePath).Dispose();
Helpers.CreateEmptyFile(UpdatingTempFilePath);
Helpers.CopyAll(UpdateFolderPath, ContentFolderPath);
File.Delete(UpdatingTempFilePath);
if (IsFirstTimeRunning)
{
Helpers.CreateEmptyFile(ContentSteamFilePath);
}
}
catch (Exception e)
{

View file

@ -461,7 +461,7 @@ public static void SteamShowInApp(bool showInApp)
{
if (showInApp)
{
File.Create(path).Dispose();
Helpers.CreateEmptyFile(path);
}
else if (File.Exists(path))
{