Skip to content

Commit 1cd69f3

Browse files
kasperk81marcpopMSFT
authored andcommitted
add fallback
1 parent 75d1b24 commit 1cd69f3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/RazorSdk/Tool/ServerProtocol/ServerConnection.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ public static string GetTempPath(string workingDir)
7777
}
7878
}
7979

80-
return Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
80+
var userProfile = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
81+
if (Path.IsPathRooted(userProfile))
82+
{
83+
return userProfile;
84+
}
85+
86+
return Environment.GetEnvironmentVariable("SYSTEMROOT");
8187
}
8288

8389
public static Task<ServerResponse> RunOnServer(

0 commit comments

Comments
 (0)