Fixing storage client issue for Azure

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-09-22 13:04:53 -07:00
parent 70bdfc3518
commit 687cdff569

View File

@@ -345,21 +345,27 @@ namespace Orchard.Azure {
}
public string GetPath() {
using (new HttpContextWeaver()) {
return _blob.Uri.ToString().Substring(_rootPath.Length).Trim('/');
}
}
public long GetSize() {
using (new HttpContextWeaver()) {
return GetDirectorySize(_blob);
}
}
public DateTime GetLastUpdated() {
return DateTime.MinValue;
}
public IStorageFolder GetParent() {
if ( _blob.Parent != null ) {
using (new HttpContextWeaver()) {
if (_blob.Parent != null) {
return new AzureBlobFolderStorage(_blob.Parent, _rootPath);
}
}
throw new ArgumentException("Directory " + _blob.Uri + " does not have a parent directory");
}