File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
src/UmbracoFileSystemProviders.Azure Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -784,12 +784,17 @@ private CloudBlockBlob GetBlockBlobReference(string path)
784
784
785
785
string blobPath = this . FixPath ( path ) ;
786
786
787
+ // Only make the request if there is an actual path. See issue 8.
788
+ // https://github.com/JimBobSquarePants/UmbracoFileSystemProviders.Azure/issues/8
789
+ if ( string . IsNullOrWhiteSpace ( path ) )
790
+ {
791
+ return null ;
792
+ }
793
+
787
794
try
788
795
{
789
796
var blobReference = this . cloudBlobContainer . GetBlobReferenceFromServer ( blobPath ) ;
790
- // Only make the request if there is an actual path. See issue 8.
791
- // https://github.com/JimBobSquarePants/UmbracoFileSystemProviders.Azure/issues/8
792
- if ( blobReference . BlobType == BlobType . BlockBlob && ! string . IsNullOrWhiteSpace ( path ) )
797
+ if ( blobReference . BlobType == BlobType . BlockBlob )
793
798
{
794
799
return blobReference as CloudBlockBlob ;
795
800
}
@@ -804,14 +809,8 @@ private CloudBlockBlob GetBlockBlobReference(string path)
804
809
{
805
810
// blob doesn't exist yet
806
811
var blobReference = this . cloudBlobContainer . GetBlockBlobReference ( blobPath ) ;
807
- if ( ! string . IsNullOrWhiteSpace ( path ) )
808
- {
809
- return blobReference ;
810
- }
811
- else
812
- {
813
- return null ;
814
- }
812
+ return blobReference ;
813
+
815
814
}
816
815
catch ( StorageException ex )
817
816
{
You can’t perform that action at this time.
0 commit comments