1

Closed

DownloadFile check return value of parent.GetChild(name);

description

version: SharpBox-1.0.0-148
 
 
Attempt to download non-existent file via the CloudStorage.DownloadFile method causes NullRefferenceException.
 
It seems that you should add IF checking whether or not file is null
 
// get the file entry
ICloudFileSystemEntry file = parent.GetChild(name);
 
If (file == null) return false; <<<<<< ADD THIS CHECK
 
// download the data
using (Stream srcdata = file.GetContentStream(FileAccess.Read))
 
 
Regards,
Yury
Closed Oct 3, 2010 at 12:07 PM by dei79

comments

dei79 wrote Sep 26, 2010 at 10:23 AM