don't stat bookmark files on load, can make blender hang on slow networks (eg, the...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 11 May 2012 17:41:38 +0000 (17:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 11 May 2012 17:41:38 +0000 (17:41 +0000)
source/blender/editors/space_file/fsmenu.c

index 28ac674f079828ae4352c8d3dfb06f5c2faeea2a..4f8da4a10691c6cb4122ff960f232f8a32c8be41 100644 (file)
@@ -277,11 +277,17 @@ void fsmenu_read_bookmarks(struct FSMenu* fsmenu, const char *filename)
                }
                else {
                        int len = strlen(line);
                }
                else {
                        int len = strlen(line);
-                       if (len>0) {
-                               if (line[len-1] == '\n') {
-                                       line[len-1] = '\0';
+                       if (len > 0) {
+                               if (line[len - 1] == '\n') {
+                                       line[len - 1] = '\0';
                                }
                                }
-                               if (BLI_exists(line)) {
+                               /* don't do this because it can be slow on network drives,
+                                * having a bookmark from a drive thats ejected or so isn't
+                                * all _that_ bad */
+#if 0
+                               if (BLI_exists(line))
+#endif
+                               {
                                        fsmenu_insert_entry(fsmenu, category, line, 0, 1);
                                }
                        }
                                        fsmenu_insert_entry(fsmenu, category, line, 0, 1);
                                }
                        }