filipw / Strathweb.AspNetCore.AzureBlobFileProvider

MIT License
55 stars 22 forks source link

AzureBlobFileProvider.GetFileInfo(string subpath) should not throw if the file does not exist #13

Closed mssteele closed 5 years ago

mssteele commented 5 years ago

Hi @filipw

AzureBlobFileProvider.GetFileInfo(string subpath) should not throw if the file does not exist. Instead it should return an IFileInfo object with property Exists == false.

I have fixed this locally - is it OK to send you pull request?

Thanks, Michael

filipw commented 5 years ago

yes please!

mssteele commented 5 years ago

Thanks, there you go!

koen-debacker commented 5 years ago

@filipw Any chance you could publish this a bit early to NuGet? Currently Application Insights logs every 'failed' GetFileInfo call as a Azure blob dependency failure, even if you catch the Exception.

filipw commented 5 years ago

published https://www.nuget.org/packages/Strathweb.AspNetCore.AzureBlobFileProvider/0.4.0