VirtualBox

Changeset 5692 in vbox


Ignore:
Timestamp:
Nov 11, 2007 5:41:29 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
26038
Message:

Updated to current seamonkey head.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/io/nsLocalFileOSX.cpp

    r2409 r5692  
    11851185
    11861186  nsLocalFile* inLF =
    1187       NS_STATIC_CAST(nsLocalFile*, (nsILocalFileMac*) inMacFile);
     1187      static_cast<nsLocalFile*>((nsILocalFileMac*) inMacFile);
    11881188
    11891189  // If both exist, compare FSRefs
     
    12561256  CFURLRef parentURLRef = ::CFURLCreateCopyDeletingLastPathComponent(kCFAllocatorDefault, mBaseRef);
    12571257  if (parentURLRef) {
     1258    // If the parent path is longer than file's path then
     1259    // CFURLCreateCopyDeletingLastPathComponent must have simply added
     1260    // two dots at the end - in this case indicate that there is no parent.
     1261    // See bug 332389.
     1262    CFStringRef path = ::CFURLGetString(mBaseRef);
     1263    CFStringRef newPath = ::CFURLGetString(parentURLRef);
     1264    if (::CFStringGetLength(newPath) < ::CFStringGetLength(path)) {
    12581265    rv = NS_ERROR_FAILURE;
    12591266    newFile = new nsLocalFile;
     
    12641271        rv = NS_OK;
    12651272      }
     1273    }
    12661274    }
    12671275    ::CFRelease(parentURLRef);
     
    15941602  AliasRecord aliasHeader = *(AliasPtr)decodedData;
    15951603  PRInt32 aliasSize = GetAliasSizeFromRecord(aliasHeader);
    1596   if (aliasSize > (dataSize * 3) / 4) { // be paranoid about having too few data
     1604  if (aliasSize > ((PRInt32)dataSize * 3) / 4) { // be paranoid about having too few data
    15971605    PR_Free(decodedData);
    15981606    return NS_ERROR_FAILURE;
     
    16011609  // Move the now-decoded data into the Handle.
    16021610  // The size of the decoded data is 3/4 the size of the encoded data. See plbase64.h
    1603   Handle        newHandle = nsnull;
     1611  Handle  newHandle = nsnull;
    16041612  if (::PtrToHand(decodedData, &newHandle, aliasSize) != noErr)
    16051613    rv = NS_ERROR_OUT_OF_MEMORY;
     
    22762284#if 0 /* bird: too new? */
    22772285    aOutStr.SetLength(usedBufLen);
    2278     if (aOutStr.Length() != usedBufLen)
     2286    if (aOutStr.Length() != (unsigned int)usedBufLen)
    22792287      return NS_ERROR_OUT_OF_MEMORY;
    22802288    UInt8 *buffer = (UInt8*) aOutStr.BeginWriting();
     
    23112319    nsCAutoString path;
    23122320    CFStringReftoUTF8(pathStrRef, path);
     2321    ::CFRelease(pathStrRef);
    23132322    *aResult = HashString(path);
    23142323    return NS_OK;
     
    24052414
    24062415        case fnfErr:
     2416        case afpObjectNotFound:
     2417        case afpDirNotFound:
    24072418            outErr = NS_ERROR_FILE_NOT_FOUND;
    24082419            break;
    24092420
    24102421        case dupFNErr:
     2422        case afpObjectExists:
    24112423            outErr = NS_ERROR_FILE_ALREADY_EXISTS;
    24122424            break;
    24132425
    24142426        case dskFulErr:
     2427        case afpDiskFull:
    24152428            outErr = NS_ERROR_FILE_DISK_FULL;
    24162429            break;
    24172430
    24182431        case fLckdErr:
     2432        case afpVolLocked:
    24192433            outErr = NS_ERROR_FILE_IS_LOCKED;
     2434            break;
     2435
     2436        case afpAccessDenied:
     2437            outErr = NS_ERROR_FILE_ACCESS_DENIED;
     2438            break;
     2439
     2440        case afpDirNotEmpty:
     2441            outErr = NS_ERROR_FILE_DIR_NOT_EMPTY;
    24202442            break;
    24212443
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette