Skip to content

Commit 08be3f2

Browse files
committed
Put in a hack to remove - from Names and Comments, to avoid a bug that happens within Save In.
1 parent 6ac4d2f commit 08be3f2

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,4 +258,5 @@ paket-files/
258258

259259
# Python Tools for Visual Studio (PTVS)
260260
__pycache__/
261-
*.pyc
261+
*.pyc
262+
/Save In Companion/app.manifest

Save In Companion/MenuEntry.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ namespace Save_In_Companion
1212
/// </summary>
1313
public class MenuEntry
1414
{
15-
public string FolderPath { get; set; }
15+
//Hack: Replacing - with spaces to avoid a bug that is within the current version of Save In which does not like -'s after the path.
16+
//Doing this in a dirty way to make it easy to rip out later, if and when the bug gets fixed.
17+
private string name;
18+
private string comment;
19+
20+
public string Name { get { return name; } set { name = value.Replace('-', ' '); } }
1621

17-
public string Name { get; set; }
22+
public string Comment { get { return comment; } set { comment = value.Replace('-', ' '); } }
1823

19-
public string Comment { get; set; }
24+
public string FolderPath { get; set; }
2025

2126
public List<MenuEntry> SubEntries { get; set; }
2227

@@ -87,7 +92,7 @@ public void BuildOutput(StringWriter stream, Settings settings)
8792
else
8893
{
8994
// Get the drive prefix.
90-
string drivePrefix = Path.GetPathRoot(FolderPath);
95+
string drivePrefix = Path.GetPathRoot(FolderPath); ;
9196

9297
// Get the folder path with the drive prefix removed
9398
string relativePath = FolderPath.Remove(0, drivePrefix.Length);

0 commit comments

Comments
 (0)