Skip to content

Commit

Permalink
Fix code on enumerating removable and internal storage folders
Browse files Browse the repository at this point in the history
- Fixes nanoframework/Home#513.

Signed-off-by: José Simões <[email protected]>
  • Loading branch information
josesimoes committed Aug 27, 2019
1 parent 46ade01 commit 22784d5
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,11 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder::GetRemovableSt
CLR_RT_HeapBlock* hbObj;
CLR_RT_HeapBlock& top = stack.PushValue();

// default to NULL (which is the expected outcome when no devices are connected)
hbObj = top.Dereference();
hbObj->SetObjectReference( NULL );

#if HAL_USE_SDC
bool sdCardEnumerated = false;
#endif

#if HAL_USE_SDC
// is the SD card file system ready?
if(sdCardFileSystemReady)
{
Expand Down Expand Up @@ -212,10 +210,6 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder::GetInternalSto
CLR_RT_HeapBlock* hbObj;
CLR_RT_HeapBlock& top = stack.PushValue();

// default to NULL (which is the expected outcome when no devices are connected)
hbObj = top.Dereference();
hbObj->SetObjectReference( NULL );

#if (USE_SPIFFS_FOR_STORAGE == TRUE)
// is the SPIFFS file system available and mounted?
if(spiffsFileSystemReady)
Expand Down

0 comments on commit 22784d5

Please sign in to comment.