Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape '&' in mod list, consistent path separators in exception #3149

Merged
merged 1 commit into from
Sep 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions GUI/Controls/ManageMods.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion GUI/Model/GUIConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private static GUIConfiguration LoadConfiguration(string path)
var fi = new FileInfo(path);
string message = string.Format(
Properties.Resources.ConfigurationParseError,
path, additionalErrorData, fi.Name, fi.DirectoryName);
fi.FullName, additionalErrorData, fi.Name, fi.DirectoryName);
throw new Kraken(message);
}
}
Expand Down
16 changes: 8 additions & 8 deletions GUI/Model/ModList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ private DataGridViewRow MakeRow(GUIMod mod, List<ModChange> changes, string inst
Value = "-"
};

var name = new DataGridViewTextBoxCell() {Value = mod.Name};
var author = new DataGridViewTextBoxCell() {Value = mod.Authors};
var name = new DataGridViewTextBoxCell { Value = mod.Name .Replace("&", "&&") };
var author = new DataGridViewTextBoxCell { Value = mod.Authors.Replace("&", "&&") };

var installVersion = new DataGridViewTextBoxCell()
{
Expand All @@ -336,12 +336,12 @@ private DataGridViewRow MakeRow(GUIMod mod, List<ModChange> changes, string inst
: mod.LatestVersion)
};

var downloadCount = new DataGridViewTextBoxCell() { Value = String.Format("{0:N0}", mod.DownloadCount) };
var compat = new DataGridViewTextBoxCell() { Value = mod.KSPCompatibility };
var size = new DataGridViewTextBoxCell() { Value = mod.DownloadSize };
var releaseDate = new DataGridViewTextBoxCell() { Value = mod.ToModule().release_date };
var installDate = new DataGridViewTextBoxCell() { Value = mod.InstallDate };
var desc = new DataGridViewTextBoxCell() { Value = mod.Abstract };
var downloadCount = new DataGridViewTextBoxCell { Value = $"{mod.DownloadCount:N0}" };
var compat = new DataGridViewTextBoxCell { Value = mod.KSPCompatibility };
var size = new DataGridViewTextBoxCell { Value = mod.DownloadSize };
var releaseDate = new DataGridViewTextBoxCell { Value = mod.ToModule().release_date };
var installDate = new DataGridViewTextBoxCell { Value = mod.InstallDate };
var desc = new DataGridViewTextBoxCell { Value = mod.Abstract.Replace("&", "&&") };

item.Cells.AddRange(selecting, autoInstalled, updating, replacing, name, author, installVersion, latestVersion, compat, size, releaseDate, installDate, downloadCount, desc);

Expand Down