Bug 36500 - [Component Sample] Android Dropbox Component sample uses if(metadata.IsDir) to throw error "The specified path is a file, not a folder..."
Summary: [Component Sample] Android Dropbox Component sample uses if(metadata.IsDir) t...
Status: RESOLVED FIXED
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Production (addons.xamarin.com)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Israel Soto [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-12-02 22:57 UTC by Kent Green [MSFT]
Modified: 2016-01-25 17:30 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Kent Green [MSFT] 2015-12-02 22:57:52 UTC
## Overview
From this desk case:
https://kb.xamarin.com/agent/case/238546

The Android Dropbox Component sample uses if(metadata.IsDir) to throw error "The specified path is a file, not a folder..." I was able to reproduce this issue in my tests.

## Code snippet
From DropboxCoreApiSample.csproj -> MainActivity.cs -> GetImagesFromDropbox ()

> if (metadata.IsDir) {
>   RunOnUiThread (() => Toast.MakeText (this, "The specified path is a file, not a folder. Please verify.", ToastLength.Long).Show ());
>   return;
> }

## Workaround 
The issue can be resolved by changing if(metadata.IsDir) to if(!metadata.IsDir)
Comment 2 Israel Soto [MSFT] 2016-01-25 17:30:08 UTC
Fixed on version 1.6.3.1