Skip to content

Commit 9723090

Browse files
committed
Removed hack after fix in Save In... was implemented.
1 parent c7004dd commit 9723090

1 file changed

Lines changed: 3 additions & 18 deletions

File tree

Save In Companion/MenuEntry.cs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,6 @@ string GetRootFolder(string path)
5757

5858
public void BuildOutput(StringWriter stream, Settings settings)
5959
{
60-
//HACK: Replace - dashes with spaces to avoid a bug that occurs in Save In... with lines that have dashes after the path. Remove this if and when that bug is fixed.
61-
string hackName = "";
62-
63-
if (!string.IsNullOrEmpty(Name))
64-
{
65-
hackName = Name.Replace('-', ' ');
66-
}
67-
68-
string hackComment = "";
69-
70-
if (!string.IsNullOrEmpty(Comment))
71-
{
72-
hackComment = Comment.Replace('-', ' ');
73-
}
74-
7560
if (IsSeperator)
7661
{
7762
stream.WriteLine("---");
@@ -80,7 +65,7 @@ public void BuildOutput(StringWriter stream, Settings settings)
8065
{
8166
if (SubEntries.Count > 0)
8267
{
83-
stream.WriteLine(string.Format(". // (alias:{0})", hackName));
68+
stream.WriteLine(string.Format(". // (alias:{0})", Name));
8469
SubEntries.ForEach(x => x.BuildOutput(stream, settings));
8570
}
8671
}
@@ -92,7 +77,7 @@ public void BuildOutput(StringWriter stream, Settings settings)
9277
{
9378
if (FolderPath == settings.DownloadsFolderPath)
9479
{
95-
finalPath = string.Format(". //{0} (alias: {1})", hackComment, hackName);
80+
finalPath = string.Format(". //{0} (alias: {1})", Comment, Name);
9681
}
9782
else
9883
{
@@ -119,7 +104,7 @@ public void BuildOutput(StringWriter stream, Settings settings)
119104

120105
// create final written path
121106
finalPath = string.Format("{0}{1} //{2} (alias:{3})", new string('>', Deepness),
122-
Path.Combine(settings.SaveInLinksFolderName, driveLetter + relativePath), hackComment, hackName);
107+
Path.Combine(settings.SaveInLinksFolderName, driveLetter + relativePath), Comment, Name);
123108

124109
if (!settings.SkipLinkCreation)
125110
{

0 commit comments

Comments
 (0)