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)
784784
785785 string blobPath = this . FixPath ( path ) ;
786786
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+
787794 try
788795 {
789796 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 )
793798 {
794799 return blobReference as CloudBlockBlob ;
795800 }
@@ -804,14 +809,8 @@ private CloudBlockBlob GetBlockBlobReference(string path)
804809 {
805810 // blob doesn't exist yet
806811 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+
815814 }
816815 catch ( StorageException ex )
817816 {
You can’t perform that action at this time.
0 commit comments