Fix bug with first-time install checking

https://discord.com/channels/1099468797410283540/1147097708709040128
This commit is contained in:
pizzaboxer 2023-09-01 10:36:03 +01:00
parent c810ae9571
commit ddd053e8b6
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8

View File

@ -496,6 +496,8 @@ namespace Bloxstrap
ProtocolHandler.Register("roblox", "Roblox", Paths.Application);
ProtocolHandler.Register("roblox-player", "Roblox", Paths.Application);
if (Environment.ProcessPath is not null && Environment.ProcessPath != Paths.Application)
{
// in case the user is reinstalling
if (File.Exists(Paths.Application) && App.IsFirstRun)
{
@ -504,8 +506,9 @@ namespace Bloxstrap
}
// check to make sure bootstrapper is in the install folder
if (!File.Exists(Paths.Application) && Environment.ProcessPath is not null)
if (!File.Exists(Paths.Application))
File.Copy(Environment.ProcessPath, Paths.Application);
}
// this SHOULD go under Register(),
// but then people who have Bloxstrap v1.0.0 installed won't have this without a reinstall