Revision: 6757
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6757&view=rev
Author:   hofman
Date:     2010-08-30 17:49:33 +0000 (Mon, 30 Aug 2010)

Log Message:
-----------
remove target file in skimconvert unembed

Modified Paths:
--------------
    trunk/SkimNotes/skimconvert.m

Modified: trunk/SkimNotes/skimconvert.m
===================================================================
--- trunk/SkimNotes/skimconvert.m       2010-08-30 12:35:21 UTC (rev 6756)
+++ trunk/SkimNotes/skimconvert.m       2010-08-30 17:49:33 UTC (rev 6757)
@@ -216,7 +216,7 @@
             } else {
                 
                 NSArray *inNotes = [fm 
readSkimNotesFromExtendedAttributesAtURL:inURL error:NULL];
-                NSMutableArray *notes = [[NSMutableArray alloc] 
initWithArray:inNotes];
+                NSMutableArray *notes = [NSMutableArray 
arrayWithArray:inNotes];
                 NSUInteger i, iMax = [pdfDoc pageCount];
                 NSSet *convertibleTypes = [NSSet 
setWithObjects:SKNFreeTextString, SKNTextString, SKNNoteString, 
SKNCircleString, SKNSquareString, SKNMarkUpString, SKNHighlightString, 
SKNUnderlineString, SKNStrikeOutString, SKNLineString, SKNInkString, nil];
                 
@@ -265,8 +265,12 @@
                 } else if ([outPath caseInsensitiveCompare:inPath] != 
NSOrderedSame) {
                     
 #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4
+                    if ([fm fileExistsAtPath:outPath])
+                        [fm removeItemAtPath:outPath error:NULL];
                     success = [fm copyItemAtPath:inPath toPath:outPath 
error:NULL];
 #else
+                    if ([fm fileExistsAtPath:outPath])
+                        [fm removeFileAtPath:outPath handler:nil];
                     success = [fm copyPath:inPath toPath:outPath handler:nil];
 #endif
                     if (success == NO) {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to