url = basename; delete [] basename; basename = nsnull;
url = baseFilename; delete [] baseFilename; baseFilename = nsnull;
FTPDataSource::GetName(nsIRDFResource *source, nsIRDFLiteral** aResult){	nsresult	rv = NS_OK;	nsXPIDLCString uri;	rv = source->GetValue( getter_Copies(uri) );	if (NS_FAILED(rv))		return(rv);	nsAutoString	url(uri);	// strip off trailing slash, if its a directory	PRInt32		len = url.Length();	if (len > 0)	{		if (url.CharAt(len-1) == '/')		{			url.Cut(len-1, 1);		}	}	// get basename	PRInt32		slash = url.RFind('/');	if (slash > 0)	{		url.Cut(0, slash+1);	}	// unescape basename	rv = NS_ERROR_NULL_POINTER;	char	*basename = url.ToNewCString();	if (basename)	{		basename = nsUnescape(basename);		if (basename)		{			url = basename;			delete [] basename;			basename = nsnull;			nsIRDFLiteral	*literal;			if (NS_SUCCEEDED(rv = gRDFService->GetLiteral(url.GetUnicode(), &literal)))			{				*aResult = literal;			}		}	}	return(rv);}