Revision: 15288
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=15288&view=rev
Author:   hofman
Date:     2009-05-08 17:05:08 +0000 (Fri, 08 May 2009)

Log Message:
-----------
don't get problems with unique file names without extension

Modified Paths:
--------------
    trunk/bibdesk/NSFileManager_BDSKExtensions.m

Modified: trunk/bibdesk/NSFileManager_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSFileManager_BDSKExtensions.m        2009-05-08 14:14:56 UTC 
(rev 15287)
+++ trunk/bibdesk/NSFileManager_BDSKExtensions.m        2009-05-08 17:05:08 UTC 
(rev 15288)
@@ -445,7 +445,10 @@
     @synchronized(self) {
     // if the file exists, try /directory/filename-i.extension
     while([self fileExistsAtPath:fullPath])
-        fullPath = [directory stringByAppendingPathComponent:[[NSString 
stringWithFormat:@"%...@-%lu", baseName, (unsigned long)++i] 
stringByAppendingPathExtension:extension]];
+        fullPath = [directory stringByAppendingPathComponent:[NSString 
stringWithFormat:@"%...@-%lu", baseName, (unsigned long)++i]];
+        if (extension)
+            fullPath = [fullPath stringByAppendingPathExtension:extension];
+        
     }
 
        return fullPath;


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

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to