Skip to content

Commit b6433a6

Browse files
committed
Fixed root folder method.
1 parent 36d6fab commit b6433a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Save In Companion/MenuEntry.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ string GetRootFolder(string path)
4646

4747
while (true)
4848
{
49-
string temp = Path.GetDirectoryName(path);
49+
string temp = Path.GetDirectoryName(rootFolder);
5050
if (String.IsNullOrEmpty(temp))
5151
break;
5252
rootFolder = temp;
@@ -143,7 +143,7 @@ private void CreateSymbolicLink(string linkPath, string realPath)
143143
{
144144
Process process = new Process();
145145
ProcessStartInfo startInfo = new ProcessStartInfo();
146-
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
146+
//startInfo.WindowStyle = ProcessWindowStyle.Hidden;
147147

148148
if (Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX)
149149
{
@@ -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(@"/K mklink /{0} ""{1}"" ""{2}""", linktype, linkPath, realPath);
163163
}
164164

165165
process.StartInfo = startInfo;

0 commit comments

Comments
 (0)