Bug 221843 - bookmarks data loss on Mac OS 10.1. Check to see whether the temporary unique file is already in the target directory before calling FSMoveObject(), since moving a file into the directory it's currently in returns an error on 10.1. Fix dependencies to rebuild libxpcom when MoreFiles is updated. r=ccarlen, sr=darin, a=brendan.

This commit is contained in:
bryner%brianryner.com 2003-12-16 09:51:35 +00:00
parent e3cda94421
commit ac18ba978f
2 changed files with 9 additions and 4 deletions

View File

@ -1412,9 +1412,12 @@ FSMoveRenameObjectUnicode(
result = FSRenameUnicode(ref, uniqueName.length, uniqueName.unicode, kTextEncodingUnknown, newRef);
require_noerr(result, FSRenameUnicodeBeforeMoveFailed);
/* Move object to its new home */
result = FSMoveObject(newRef, destDirectory, newRef);
require_noerr(result, FSMoveObjectAfterRenameFailed);
if ( FSCompareFSRefs(destDirectory, &originalDirectory) != noErr )
{
/* Move object to its new home */
result = FSMoveObject(newRef, destDirectory, newRef);
require_noerr(result, FSMoveObjectAfterRenameFailed);
}
/* Rename the object to new name */
result = FSRenameUnicode(ref, nameLength, name, textEncodingHint, newRef);

View File

@ -100,7 +100,9 @@ endif
# pull in MoreFiles for MacOSX
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
EXTRA_DSO_LDOPTS += $(DEPTH)/dist/lib/libmacmorefiles_s.a
EXTRA_DSO_LIBS = macmorefiles_s
EXTRA_DSO_LDOPTS += $(EXTRA_DSO_LIBS)
EXTRA_DEPS += $(DIST)/lib/$(LIB_PREFIX)macmorefiles_s.$(LIB_SUFFIX)
endif
# Force use of PIC