Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / space_file / fsmenu.c
index ea251f2..5ecb95b 100644 (file)
@@ -350,7 +350,7 @@ void fsmenu_remove_entry(struct FSMenu *fsmenu, FSMenuCategory category, int idx
                idx--;
 
        if (fsm_iter) {
-               /* you should only be able to remove entries that were 
+               /* you should only be able to remove entries that were
                 * not added by default, like windows drives.
                 * also separators (where path == NULL) shouldn't be removed */
                if (fsm_iter->save && fsm_iter->path) {
@@ -510,18 +510,18 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks)
                /* Get mounted volumes better method OSX 10.6 and higher, see: */
                /*https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFURLRef/Reference/reference.html*/
                /* we get all volumes sorted including network and do not relay on user-defined finder visibility, less confusing */
-               
+
                CFURLRef cfURL = NULL;
                CFURLEnumeratorResult result = kCFURLEnumeratorSuccess;
                CFURLEnumeratorRef volEnum = CFURLEnumeratorCreateForMountedVolumes(NULL, kCFURLEnumeratorSkipInvisibles, NULL);
-               
+
                while (result != kCFURLEnumeratorEnd) {
                        char defPath[FILE_MAX];
 
                        result = CFURLEnumeratorGetNextURL(volEnum, &cfURL, NULL);
                        if (result != kCFURLEnumeratorSuccess)
                                continue;
-                       
+
                        CFURLGetFileSystemRepresentation(cfURL, false, (UInt8 *)defPath, FILE_MAX);
 
                        /* Add end slash for consistency with other platforms */
@@ -529,29 +529,29 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks)
 
                        fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, defPath, NULL, FS_INSERT_SORTED);
                }
-               
+
                CFRelease(volEnum);
-               
+
                /* Finally get user favorite places */
                if (read_bookmarks) {
                        UInt32 seed;
                        LSSharedFileListRef list = LSSharedFileListCreate(NULL, kLSSharedFileListFavoriteItems, NULL);
                        CFArrayRef pathesArray = LSSharedFileListCopySnapshot(list, &seed);
                        CFIndex pathesCount = CFArrayGetCount(pathesArray);
-                       
+
                        for (CFIndex i = 0; i < pathesCount; i++) {
                                LSSharedFileListItemRef itemRef = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(pathesArray, i);
-                               
+
                                CFURLRef cfURL = NULL;
-                               OSErr err = LSSharedFileListItemResolve(itemRef, 
+                               OSErr err = LSSharedFileListItemResolve(itemRef,
                                                                        kLSSharedFileListNoUserInteraction |
                                                                        kLSSharedFileListDoNotMountVolumes,
                                                                        &cfURL, NULL);
                                if (err != noErr || !cfURL)
                                        continue;
-                               
+
                                CFStringRef pathString = CFURLCopyFileSystemPath(cfURL, kCFURLPOSIXPathStyle);
-                               
+
                                if (pathString == NULL || !CFStringGetCString(pathString, line, sizeof(line), kCFStringEncodingUTF8))
                                        continue;
 
@@ -563,11 +563,11 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks)
                                if (!strstr(line, "myDocuments.cannedSearch") && (*line != '\0')) {
                                        fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM_BOOKMARKS, line, NULL, FS_INSERT_LAST);
                                }
-                               
+
                                CFRelease(pathString);
                                CFRelease(cfURL);
                        }
-                       
+
                        CFRelease(pathesArray);
                        CFRelease(list);
                }