mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Fix application path detection
Launching from args sets the Environment.CurrentDirectory to that of the files that launched the program; instead we want the Application.StartupPath (where the exe is, which is where our backup files are). Closes #948
This commit is contained in:
parent
07b4db8bbe
commit
ab88f5b4e2
1 changed files with 1 additions and 1 deletions
|
@ -268,7 +268,7 @@ namespace PKHeX.WinForms
|
||||||
|
|
||||||
#region Path Variables
|
#region Path Variables
|
||||||
|
|
||||||
public static string WorkingDirectory => WinFormsUtil.IsClickonceDeployed ? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PKHeX") : Environment.CurrentDirectory;
|
public static string WorkingDirectory => WinFormsUtil.IsClickonceDeployed ? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PKHeX") : Application.StartupPath;
|
||||||
public static string DatabasePath => Path.Combine(WorkingDirectory, "pkmdb");
|
public static string DatabasePath => Path.Combine(WorkingDirectory, "pkmdb");
|
||||||
public static string MGDatabasePath => Path.Combine(WorkingDirectory, "mgdb");
|
public static string MGDatabasePath => Path.Combine(WorkingDirectory, "mgdb");
|
||||||
private static string BackupPath => Path.Combine(WorkingDirectory, "bak");
|
private static string BackupPath => Path.Combine(WorkingDirectory, "bak");
|
||||||
|
|
Loading…
Reference in a new issue