[Bf-blender-cvs] [dc95c31] master: Fix T49502: file browser on OS X not highlighting external drives.

Brecht Van Lommel noreply at git.blender.org
Wed Oct 12 00:19:05 CEST 2016


Commit: dc95c3137256e36314c9b1125f7b9f2f6e51ce78
Author: Brecht Van Lommel
Date:   Wed Oct 12 00:07:11 2016 +0200
Branches: master
https://developer.blender.org/rBdc95c3137256e36314c9b1125f7b9f2f6e51ce78

Fix T49502: file browser on OS X not highlighting external drives.

===================================================================

M	source/blender/editors/space_file/fsmenu.c

===================================================================

diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index 72034b4..631ff06 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -518,14 +518,18 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks)
 		CFURLEnumeratorRef volEnum = CFURLEnumeratorCreateForMountedVolumes(NULL, kCFURLEnumeratorSkipInvisibles, NULL);
 		
 		while (result != kCFURLEnumeratorEnd) {
-			unsigned char defPath[FILE_MAX];
+			char defPath[FILE_MAX];
 
 			result = CFURLEnumeratorGetNextURL(volEnum, &cfURL, NULL);
 			if (result != kCFURLEnumeratorSuccess)
 				continue;
 			
 			CFURLGetFileSystemRepresentation(cfURL, false, (UInt8 *)defPath, FILE_MAX);
-			fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, (char *)defPath, NULL, FS_INSERT_SORTED);
+
+			/* Add end slash for consistency with other platforms */
+			BLI_add_slash(defPath);
+
+			fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, defPath, NULL, FS_INSERT_SORTED);
 		}
 		
 		CFRelease(volEnum);




More information about the Bf-blender-cvs mailing list