Fixing folder creation on Azure

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2010-12-18 22:30:28 +01:00
parent 4b5f2db33d
commit 39d7442014
2 changed files with 22 additions and 1 deletions

View File

@@ -156,7 +156,13 @@ namespace Orchard.Azure {
public void TryCreateFolder(string path) {
EnsurePathIsRelative(path);
CreateFile(Combine(path, FolderEntry));
using (new HttpContextWeaver()) {
if (Container.DirectoryExists(String.Concat(_root, path))) {
return;
}
CreateFile(Combine(path, FolderEntry));
}
}
public void CreateFolder(string path) {