@@ -261,7 +261,7 @@ private static void InitializeFileSystem(WebHostSettings settings, bool readOnly
261
261
if ( ! readOnlyFileSystem )
262
262
{
263
263
// Delete hostingstart.html if any. Azure creates that in all sites by default
264
- string siteRootPath = Path . Combine ( home , @ "site\ wwwroot") ;
264
+ string siteRootPath = Path . Combine ( home , "site" , " wwwroot") ;
265
265
string hostingStart = Path . Combine ( siteRootPath , "hostingstart.html" ) ;
266
266
if ( File . Exists ( hostingStart ) )
267
267
{
@@ -272,7 +272,7 @@ private static void InitializeFileSystem(WebHostSettings settings, bool readOnly
272
272
if ( ! readOnlyFileSystem )
273
273
{
274
274
// Create the tools folder if it doesn't exist
275
- string toolsPath = Path . Combine ( home , @ "site\ tools") ;
275
+ string toolsPath = Path . Combine ( home , "site" , " tools") ;
276
276
Directory . CreateDirectory ( toolsPath ) ;
277
277
278
278
// Create the test data folder
@@ -283,15 +283,16 @@ private static void InitializeFileSystem(WebHostSettings settings, bool readOnly
283
283
}
284
284
285
285
var folders = new List < string > ( ) ;
286
- folders . Add ( Path . Combine ( home , @"site\ tools" ) ) ;
286
+ folders . Add ( Path . Combine ( home , @"site" , " tools") ) ;
287
287
288
288
string path = Environment . GetEnvironmentVariable ( "PATH" ) ;
289
- string additionalPaths = string . Join ( ";" , folders ) ;
289
+ // PathSeperator is ; on Windows and : on Unix
290
+ string additionalPaths = string . Join ( Path . PathSeparator , folders ) ;
290
291
291
292
// Make sure we haven't already added them. This can happen if the appdomain restart (since it's still same process)
292
293
if ( ! path . Contains ( additionalPaths ) )
293
294
{
294
- path = additionalPaths + ";" + path ;
295
+ path = additionalPaths + Path . PathSeparator + path ;
295
296
296
297
Environment . SetEnvironmentVariable ( "PATH" , path ) ;
297
298
}
0 commit comments