* Moved updating configs to another repository

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2025-04-20 22:36:08 +07:00
parent 00bc19dbef
commit 414b8c413b

View File

@@ -11,7 +11,7 @@ namespace SaveWizard
{
public partial class UpdateForm: Form
{
private static readonly string githubLink = "https://raw.githubusercontent.com/JDM170/SaveWizard/configs/";
private static readonly string githubLink = "https://raw.githubusercontent.com/JDM170/SaveWizard_configs/main/";
public UpdateForm()
{
@@ -47,7 +47,7 @@ namespace SaveWizard
using (WebClient wb = new WebClient())
{
wb.Encoding = Encoding.UTF8;
string responseInString = wb.DownloadString($"{githubLink}configs/version.cfg");
string responseInString = wb.DownloadString($"{githubLink}version.cfg");
Dictionary<string, string> result = JsonConvert.DeserializeObject<Dictionary<string, string>>(responseInString);
string[] splitted;
string path;
@@ -58,7 +58,7 @@ namespace SaveWizard
CheckPath(path);
if (Utils.GenerateMD5(path) != unit.Value)
{
string newConfigText = wb.DownloadString($"{githubLink}{path}");
string newConfigText = wb.DownloadString($"{githubLink}{path.Replace("configs/", "")}");
File.WriteAllText(Path.Combine(Environment.CurrentDirectory, path), newConfigText.Replace("\n", "\r\n"));
}
backgroundWorker1.ReportProgress(progressBar1.Value + 1);