mFinalFile->Append(NS_ConvertUCS2toUTF8(subString));
mFinalFile->Append(subString);
    mMode(mode){    MOZ_COUNT_CTOR(nsInstallFile);    PRBool flagExists, flagIsFile;    mFolderCreateCount = 0;    if ((folderSpec == nsnull) || (inInstall == NULL))    {        *error = nsInstall::INVALID_ARGUMENTS;        return;    }    *error = nsInstall::SUCCESS;        nsCOMPtr<nsIFile> tmp = folderSpec->GetFileSpec();    if (!tmp)    {        *error = nsInstall::INVALID_ARGUMENTS;        return;    }    tmp->Clone(getter_AddRefs(mFinalFile));    if (mFinalFile == nsnull)    {        *error = nsInstall::OUT_OF_MEMORY;        return;    }    mFinalFile->Exists(&flagExists);    if (flagExists)    {        // is there a file with the same name as the proposed folder?        mFinalFile->IsFile(&flagIsFile);        if ( flagIsFile)         {            *error = nsInstall::ACCESS_DENIED;            return;        }        // else this directory already exists, so do nothing    }    //Need to parse the inPartialPath to remove any separators    PRBool finished = PR_FALSE;    PRUint32 offset = 0;    PRInt32 location = 0, nodeLength = 0;    nsString subString;    location = inPartialPath.FindChar('/', offset);    if (location == ((PRInt32)inPartialPath.Length() - 1)) //trailing slash    {        *error = nsInstall::INVALID_ARGUMENTS;        return;    }    while (!finished)    {        if (location == kNotFound) //no separators were found        {            nodeLength = inPartialPath.Length() - offset;            finished = PR_TRUE;        }        else        {            nodeLength = location - offset;        }                if (nodeLength > MAX_FILENAME)         {            *error = nsInstall::FILENAME_TOO_LONG;            return;        }        else        {            nsresult rv = inPartialPath.Mid(subString, offset, nodeLength);            mFinalFile->Append(NS_ConvertUCS2toUTF8(subString));            offset += nodeLength + 1;            if (!finished)                location = inPartialPath.FindChar('/', offset);        }    }    mFinalFile->Exists(&mReplaceFile);    mVersionRegistryName  = new nsString(inComponentName);    mJarLocation          = new nsString(inJarLocation);    mVersionInfo	        = new nsString(inVInfo);         if (mVersionRegistryName == nsnull ||        mJarLocation         == nsnull ||        mVersionInfo         == nsnull )    {        *error = nsInstall::OUT_OF_MEMORY;        return;    }}