jfversluis / FilePicker-Plugin-for-Xamarin-and-Windows

FilePicker Plugin for Xamarin and Windows
MIT License
157 stars 80 forks source link

GetDataColumn does not have a "catch" in its try block #167

Closed EvoPulseGaming closed 4 years ago

EvoPulseGaming commented 4 years ago

Is this on purpose? I'm fitting in a folder picker into this solution, and tried feeding the folder URI into the GetPath function and saw it "crashing" in the GetDataColumn try block (it skips to finally)

vividos commented 4 years ago

The execution will finally land in https://github.com/jfversluis/FilePicker-Plugin-for-Xamarin-and-Windows/blob/master/src/Plugin.FilePicker/Android/IOUtil.android.cs#L80, which is the case when no real file path can be obtained and the ContentProvider must be used to retrieve the picked data stream.