Skip to content

Commit 0a741ec

Browse files
committed
Fixed some formatting issues with the symlink creation.
1 parent 7cb27dd commit 0a741ec

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Save In Companion/MenuEntry.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ string GetRootFolder(string path)
4949
string temp = Path.GetDirectoryName(path);
5050
if (String.IsNullOrEmpty(temp))
5151
break;
52-
path = temp;
52+
rootFolder = temp;
5353
}
5454
}
5555
return rootFolder;
@@ -149,7 +149,7 @@ private void CreateSymbolicLink(string linkPath, string realPath)
149149
{
150150
startInfo.FileName = "ln";
151151

152-
startInfo.Arguments = string.Format("-s {0} {1}", realPath, linkPath);
152+
startInfo.Arguments = string.Format(@"-s ""{0}"" ""{1}""", realPath, linkPath);
153153
}
154154
else
155155
{
@@ -159,7 +159,7 @@ private void CreateSymbolicLink(string linkPath, string realPath)
159159
if (IsUserAnAdmin()) linktype = "D";
160160
else linktype = "J";
161161

162-
startInfo.Arguments = string.Format("/C mklink /{0} {1} {2}", linktype, linkPath, realPath);
162+
startInfo.Arguments = string.Format(@"/c mklink /{0} ""{1}"" ""{2}""", linktype, linkPath, realPath);
163163
}
164164

165165
process.StartInfo = startInfo;

0 commit comments

Comments
 (0)