Commit b5000036 authored by Archnoc's avatar Archnoc

clean install path input

parent dbd676f6
......@@ -79,7 +79,7 @@ namespace sunrise_launcher
var server = new Server();
server.ManifestURL = manifesturl;
server.InstallPath = installpath.Trim(); //td; check install path
server.InstallPath = CleanInstallPath(installpath);
await GetInfoAsync(server);
if (server.State == State.Error)
......@@ -102,7 +102,7 @@ namespace sunrise_launcher
var server = Get(oldmanifesturl);
if (server == null) return;
server.ManifestURL = manifesturl.Trim();
server.InstallPath = installpath.Trim(); //td; check install path
server.InstallPath = CleanInstallPath(installpath);
await GetInfoAsync(server);
this.ActivateSignal("update");
......@@ -111,6 +111,14 @@ namespace sunrise_launcher
this.ActivateSignal("update");
}
private string CleanInstallPath(string path)
{
path = path.Trim();
path = path.Replace("\\", "/");
path = path.Replace("`", "");
return path;
}
public void Remove(string name)
{
var server = Get(name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment