{ if (mCurrentFilePath) PR_Free((char*)mCurrentFilePath); mCurrentFilePath = PL_strdup(fileURL); }
mCurrentFileSpec = fileURL;
nsHistoryDataSource::ReadOneHistoryFile(nsInputFileStream& aStream, const char *fileURL){	nsresult	rv = NS_ERROR_FAILURE;	nsAutoString	buffer;	while (! aStream.eof() && ! aStream.failed())	{		nsresult rv = NS_OK;		char c = aStream.get();		if (c != '\r')		{			buffer += c;		}		else		{			int n = 0;			char *title, *url, *referer, *date;			PRTime time;			PRTime fileTime = LL_ZERO;			char *aLine = buffer.ToNewCString();			if (aLine)			{				url = aLine;				title = strchr(aLine, '\t') + 1;				*(title - 1) = '\0';				referer = strchr(title, '\t') + 1;				*(referer - 1) = '\0';				date = strchr(referer, '\t') + 1;         				*(date -1 ) = '\0';				PR_ParseTimeString (date, 0, &time);				if (LL_IS_ZERO(fileTime))				{					PRExplodedTime etime;					fileTime = time;					PR_ExplodeTime(time, PR_LocalTimeParameters, &etime);					if (etime.tm_yday == mSessionTime.tm_yday)					{					    if (mCurrentFilePath)					        PR_Free((char*)mCurrentFilePath);					    mCurrentFilePath = PL_strdup(fileURL);					}				}				AddPageToGraph(url, title, referer,  time);				delete [] aLine;			}			buffer = "";		}        	}	return(rv);}