Skip to content

Commit

Permalink
INI file location search fix, and use LocalApplicationData as describ…
Browse files Browse the repository at this point in the history
…ed in the readme
  • Loading branch information
bbbradsmith committed Oct 13, 2024
1 parent 935f1bc commit fbe4305
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BinxelviewForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2636,7 +2636,7 @@ private void BinxelviewForm_Load(object sender, EventArgs e)
// current directory, executable directory, appdata
dir_cwd = new DirectoryInfo(".");
dir_exe = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory);
dir_loc = new DirectoryInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData),APPDATA_FOLDER));
dir_loc = new DirectoryInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),APPDATA_FOLDER));

// suppress unnecessary redraws during setup
disable_pixel_redraw = true;
Expand Down Expand Up @@ -2665,8 +2665,8 @@ private void BinxelviewForm_Load(object sender, EventArgs e)
// parse INI file
ini_path = "";
string ini_cwd = Path.Combine(dir_cwd.ToString(),"Binxelview.ini");
ini_exe = Path.Combine(dir_cwd.ToString(),"Binxelview.ini");
ini_loc = Path.Combine(dir_cwd.ToString(),"Binxelview.ini");
ini_exe = Path.Combine(dir_exe.ToString(),"Binxelview.ini");
ini_loc = Path.Combine(dir_loc.ToString(),"Binxelview.ini");
if (File.Exists(ini_cwd)) { ini_path = ini_cwd; }
else if (File.Exists(ini_exe)) { ini_path = ini_exe; }
else if (File.Exists(ini_loc)) { ini_path = ini_loc; }
Expand Down

0 comments on commit fbe4305

Please sign in to comment.