azure-contrib / AzureDirectory

A Lucene Directory Provider for Azure Blob Storage
Microsoft Public License
77 stars 57 forks source link

CreateIfNotExists fails in AzureDirectory #37

Open BlackBatSoftware opened 4 years ago

BlackBatSoftware commented 4 years ago

There are versions of Windows.Azure.Storage that do not implement the "CreateIfNotExists" function syncronously, they only use the "CreateIfNotExistsAsync" method.

AzureDirectory.cs should have:

public void CreateContainer()
{
  _blobContainer = _blobClient.GetContainerReference(_containerName);
  _blobContainer.CreateIfNotExistsAsync().Wait();
}
BlackBatSoftware commented 4 years ago

%^$%^#$% not letting me fix it! Grrrrr.

BlackBatSoftware commented 4 years ago

Github is really ticking me off today. The same change is needed for the DeleteIfExistsAsync().Wait() in DeleteFile