Skip to content

Commit

Permalink
fix case where ini directory is the presetdir directory
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbradsmith committed Oct 13, 2024
1 parent abbe497 commit d9ee506
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BinxelviewForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,8 @@ string saveIni(string path)
if (preset_dir.Length > 0)
{
string p = Path.GetFullPath(preset_dir);
if (p.StartsWith(fulldir)) p = p.Substring(fulldir.Length+1);
if (p == fulldir) p = "";
else if (p.StartsWith(fulldir)) p = p.Substring(fulldir.Length+1);
sw.WriteLine("presetdir=" + p);
}
foreach (Preset pi in presets) // save current preset if it exists in the library
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ INI files provide the same options as the command line, with minor differences:
- One option may be used per line, there is no leading - for an option like the command line.
- Blank lines, or lines starting with # will be ignored.
- Paths can be either absolute or relative to the INI file's directory.
Paths inside the INI directory (or subdirectories) will be automatically saved as relative.
- The 'ini' option cannot be used to load an INI file from within an INI file.

The default INI file location will be the first found in one of 3 locations, checked in order:
Expand Down

0 comments on commit d9ee506

Please sign in to comment.