Prevent issues with extracting due to Environment.CurrentDirectory not being useable inside of Application Settings, Rookie will now check if a boolean is set to true or false (by default it is false), when it is false it will set the downloadDir to its currentDirectory, otherwise it will use a set custom one.
This commit is contained in:
@@ -195,7 +195,10 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="downloadDir" serializeAs="String">
|
||||
<value>Environment.CurrentDirectory</value>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="customDir" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</AndroidSideloader.Properties.Settings>
|
||||
<AndroidADB.Sideloader.Properties.Settings>
|
||||
|
||||
@@ -2303,6 +2303,10 @@ Things you can try:
|
||||
public async void downloadInstallGameButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
if (!Properties.Settings.Default.customDir)
|
||||
{
|
||||
Properties.Settings.Default.downloadDir = Environment.CurrentDirectory.ToString();
|
||||
}
|
||||
bool obbsMismatch = false;
|
||||
if (nodeviceonstart && !updatesnotified)
|
||||
{
|
||||
|
||||
14
Properties/Settings.Designer.cs
generated
14
Properties/Settings.Designer.cs
generated
@@ -756,7 +756,7 @@ namespace AndroidSideloader.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Environment.CurrentDirectory")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string downloadDir {
|
||||
get {
|
||||
return ((string)(this["downloadDir"]));
|
||||
@@ -765,5 +765,17 @@ namespace AndroidSideloader.Properties {
|
||||
this["downloadDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool customDir {
|
||||
get {
|
||||
return ((bool)(this["customDir"]));
|
||||
}
|
||||
set {
|
||||
this["customDir"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,10 @@
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="downloadDir" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">Environment.CurrentDirectory</Value>
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="customDir" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -101,7 +101,8 @@ namespace AndroidSideloader
|
||||
private void resetSettingsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.Reset();
|
||||
Properties.Settings.Default.downloadDir = Environment.CurrentDirectory;
|
||||
Properties.Settings.Default.customDir = false;
|
||||
Properties.Settings.Default.downloadDir = Environment.CurrentDirectory.ToString();
|
||||
intSettings();
|
||||
}
|
||||
|
||||
@@ -203,6 +204,7 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (downloadDirectorySetter.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
Properties.Settings.Default.customDir = true;
|
||||
Properties.Settings.Default.downloadDir = downloadDirectorySetter.SelectedPath;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user