Skip to content

Commit a79a587

Browse files
Fix SaveToDisk default filename suggestion to use the text of the tree node instead. The ToString() implementation returns the tree node path, which always starts with the full path of the loaded assembly. So in my case the suggested file name was always "C" when the assembly was located on the C: drive.
1 parent 0e1478f commit a79a587

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ILSpy/TextView/DecompilerTextView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ public void SaveToDisk(ILSpy.Language language, IEnumerable<ILSpyTreeNode> treeN
10911091
SaveFileDialog dlg = new SaveFileDialog();
10921092
dlg.DefaultExt = language.FileExtension;
10931093
dlg.Filter = language.Name + "|*" + language.FileExtension + Properties.Resources.AllFiles;
1094-
dlg.FileName = WholeProjectDecompiler.CleanUpFileName(treeNodes.First().ToString(), language.FileExtension);
1094+
dlg.FileName = WholeProjectDecompiler.CleanUpFileName(treeNodes.First().Text.ToString(), language.FileExtension);
10951095
if (dlg.ShowDialog() == true)
10961096
{
10971097
SaveToDisk(new DecompilationContext(language, treeNodes.ToArray(), options), dlg.FileName);

0 commit comments

Comments
 (0)