mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-28 15:31:30 +12:00
Create Steam file on first time running
This commit is contained in:
parent
e53275a3e9
commit
59397b8b98
4 changed files with 17 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -125,5 +125,10 @@ public static bool IsCommandExist(string[] args, string command)
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void CreateEmptyFile(string path)
|
||||
{
|
||||
File.Create(path).Dispose();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -461,7 +461,7 @@ public static void SteamShowInApp(bool showInApp)
|
|||
{
|
||||
if (showInApp)
|
||||
{
|
||||
File.Create(path).Dispose();
|
||||
Helpers.CreateEmptyFile(path);
|
||||
}
|
||||
else if (File.Exists(path))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue