From 632d9f171e1e4bb3e61fe3e839eb31ac7afebb40 Mon Sep 17 00:00:00 2001 From: "niels.kuhnel" Date: Thu, 25 Oct 2012 08:14:10 -0200 Subject: [PATCH] Support for running Umbraco from a network drive. --- src/Umbraco.Core/IO/IOHelper.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/IO/IOHelper.cs b/src/Umbraco.Core/IO/IOHelper.cs index 32e15d826d..095759eea9 100644 --- a/src/Umbraco.Core/IO/IOHelper.cs +++ b/src/Umbraco.Core/IO/IOHelper.cs @@ -85,9 +85,11 @@ namespace Umbraco.Core.IO public static string MapPath(string path, bool useHttpContext) { // Check if the path is already mapped - if (path.Length >= 2 && path[1] == Path.VolumeSeparatorChar) + if ((path.Length >= 2 && path[1] == Path.VolumeSeparatorChar) + || path.StartsWith(@"\\")) //UNC Paths start with "\\". If the site is running off a network drive mapped paths will look like "\\Whatever\Boo\Bar" + { return path; - + } // Check that we even have an HttpContext! otherwise things will fail anyways // http://umbraco.codeplex.com/workitem/30946