escPath += "/";
escPath += '/';
net_GetURLSpecFromFile(nsIFile *aFile, nsACString &result){    // NOTE: This is identical to the implementation in nsURLHelperOSX.cpp    nsresult rv;    nsCAutoString ePath;    // construct URL spec from native file path    rv = aFile->GetNativePath(ePath);    if (NS_FAILED(rv)) return rv;    nsCAutoString escPath;    NS_NAMED_LITERAL_CSTRING(prefix, "file://");            // Escape the path with the directory mask    if (NS_EscapeURL(ePath.get(), ePath.Length(), esc_Directory+esc_Forced, escPath))        escPath.Insert(prefix, 0);    else        escPath.Assign(prefix + ePath);    // esc_Directory does not escape the semicolons, so if a filename     // contains semicolons we need to manually escape them.    escPath.ReplaceSubstring(";", "%3b");    // if this file references a directory, then we need to ensure that the    // URL ends with a slash.  this is important since it affects the rules    // for relative URL resolution when this URL is used as a base URL.    // if the file does not exist, then we make no assumption about its type,    // and simply leave the URL unmodified.    if (escPath.Last() != '/') {        PRBool dir;        rv = aFile->IsDirectory(&dir);        if (NS_SUCCEEDED(rv) && dir)            escPath += "/";    }        result = escPath;    return NS_OK;}