Use NFC for local files that are uploaded. Fix menu labels. Update version. v0.9
authorMiltiadis Vasilakis <mvasilak@gmail.com>
Tue, 10 Apr 2012 09:37:50 +0000 (12:37 +0300)
committerMiltiadis Vasilakis <mvasilak@gmail.com>
Tue, 10 Apr 2012 09:37:50 +0000 (12:37 +0300)
pithos-macos/PithosBrowserController.m
pithos-macos/PithosSyncDaemon.m
pithos-macos/PithosUtilities.m
pithos-macos/en.lproj/MainMenu.xib
pithos-macos/pithos-macos-Info.plist

index 2186c60..08812f3 100644 (file)
@@ -1099,7 +1099,8 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
         if ([fileManager fileExistsAtPath:filePath isDirectory:&isDirectory]) {
             if (!isDirectory) {
                 // Upload file
-                NSString *objectName = [objectNamePrefix stringByAppendingPathComponent:[filePath lastPathComponent]];
+                NSString *objectName = [[objectNamePrefix stringByAppendingPathComponent:[filePath lastPathComponent]] 
+                                        precomposedStringWithCanonicalMapping];
                 // Operation: Upload a local file
                 __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
                     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@@ -1176,7 +1177,8 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column {
                 [alert addButtonWithTitle:@"Cancel"];
                 NSInteger choice = [alert runModal];
                 if (choice == NSAlertFirstButtonReturn) {
-                    NSString *objectName = [objectNamePrefix stringByAppendingPathComponent:[filePath lastPathComponent]];
+                    NSString *objectName = [[objectNamePrefix stringByAppendingPathComponent:[filePath lastPathComponent]] 
+                                            precomposedStringWithCanonicalMapping];
                     // Operation: Upload a local directory and its descendants
                     // The resulting ASIPithosObjectRequests are chained through dependencies
                     __block NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
index 0e74d76..cfd186e 100644 (file)
                                                                          objectForKey:pithosContainer.name];
                 NSDirectoryEnumerator *dirEnumerator = [fileManager enumeratorAtPath:containerDirectoryPath];
                 for (NSString *objectName in dirEnumerator) {
+                    objectName = [objectName precomposedStringWithCanonicalMapping];
                     if (operation.isCancelled) {
                         operation.completionBlock = nil;
                         [self saveLocalState];
index da1a2a9..78fbc10 100644 (file)
             if (!isDirectory) {
                 hashes = [HashMapHash objectHashMapStrings:filePath withBlockHash:blockHash andBlockSize:blockSize];
                 if (hashes) {
-                    subObjectName = [objectName stringByAppendingPathComponent:objectNameSuffix];
+                    subObjectName = [[objectName stringByAppendingPathComponent:objectNameSuffix] precomposedStringWithCanonicalMapping];
                     fileName = [filePath lastPathComponent];
                     if ([filePath hasSuffix:@"/"])
                         fileName = [fileName stringByAppendingString:@"/"];
                 }
                 
             } else {
-                subObjectName = [objectName stringByAppendingPathComponent:objectNameSuffix];
+                subObjectName = [[objectName stringByAppendingPathComponent:objectNameSuffix] precomposedStringWithCanonicalMapping];
                 fileName = [filePath lastPathComponent];
                 objectRequest = [ASIPithosObjectRequest writeObjectDataRequestWithPithos:pithos 
                                                                            containerName:containerName 
index 897f540..80ac1a3 100644 (file)
                                                                </object>
                                                                <object class="NSMenuItem" id="755159360">
                                                                        <reference key="NSMenu" ref="110575045"/>
-                                                                       <string key="NSTitle">Hide pithos-macos</string>
+                                                                       <string key="NSTitle">Hide Pithos+</string>
                                                                        <string key="NSKeyEquiv">h</string>
                                                                        <int key="NSKeyEquivModMask">1048576</int>
                                                                        <int key="NSMnemonicLoc">2147483647</int>
                                                                </object>
                                                                <object class="NSMenuItem" id="632727374">
                                                                        <reference key="NSMenu" ref="110575045"/>
-                                                                       <string key="NSTitle">Quit pithos-macos</string>
+                                                                       <string key="NSTitle">Quit Pithos+</string>
                                                                        <string key="NSKeyEquiv">q</string>
                                                                        <int key="NSKeyEquivModMask">1048576</int>
                                                                        <int key="NSMnemonicLoc">2147483647</int>
                                                                        <reference key="NSOnImage" ref="35465992"/>
                                                                        <reference key="NSMixedImage" ref="502551668"/>
                                                                </object>
-                                                               <object class="NSMenuItem" id="828392926">
+                                                               <object class="NSMenuItem" id="159297150">
                                                                        <reference key="NSMenu" ref="789758025"/>
                                                                        <string key="NSTitle">Delete</string>
                                                                        <string key="NSKeyEquiv"/>
                                        <object class="IBActionConnection" key="connection">
                                                <string key="label">delete:</string>
                                                <reference key="source" ref="1014"/>
-                                               <reference key="destination" ref="828392926"/>
+                                               <reference key="destination" ref="159297150"/>
                                        </object>
                                        <int key="connectionID">625</int>
                                </object>
                                                        <reference ref="296257095"/>
                                                        <reference ref="29853731"/>
                                                        <reference ref="860595796"/>
-                                                       <reference ref="828392926"/>
+                                                       <reference ref="159297150"/>
                                                </object>
                                                <reference key="parent" ref="952259628"/>
                                        </object>
                                        </object>
                                        <object class="IBObjectRecord">
                                                <int key="objectID">623</int>
-                                               <reference key="object" ref="828392926"/>
+                                               <reference key="object" ref="159297150"/>
                                                <reference key="parent" ref="789758025"/>
                                        </object>
                                </object>
index 909bbc7..e2aaf40 100644 (file)
@@ -17,7 +17,7 @@
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>0.8.3</string>
+       <string>0.9</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleURLTypes</key>
@@ -32,7 +32,7 @@
                </dict>
        </array>
        <key>CFBundleVersion</key>
-       <string>20120326a</string>
+       <string>20120410.0</string>
        <key>LSMinimumSystemVersion</key>
        <string>${MACOSX_DEPLOYMENT_TARGET}</string>
        <key>NSMainNibFile</key>