diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-05-15 17:20:14 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-05-15 17:26:47 +0300 |
commit | 6dceafbde392ce0b2c2086d0906acf638d9902b2 (patch) | |
tree | 847238fb41b443f7e8ae4f1c77ea4e2874daea61 /source/blender/editors/space_file/space_file.c | |
parent | e39737f166bd8498c3759675bb5457c2bf58f07f (diff) |
Fix T63748: Long startups after network drives are disconnected.
We need to make those paths validation async, since some infamous OS is
unable to provide a quick way to check whether a path is valid or not...
Not much to say here, this is basic wmJob stuff really... We don’t even
need complex threaded coordination locks or atomics, given how simple
the changes are here.
Fake-tested with some `sleep()` calls to add atificial delay, seems to
work as expected.
Diffstat (limited to 'source/blender/editors/space_file/space_file.c')
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 9fb07042104..1fd878e4662 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -142,18 +142,16 @@ static void file_free(SpaceLink *sl) } /* spacetype; init callback, area size changes, screen set, etc */ -static void file_init(wmWindowManager *UNUSED(wm), ScrArea *sa) +static void file_init(wmWindowManager *wm, ScrArea *sa) { SpaceFile *sfile = (SpaceFile *)sa->spacedata.first; + struct FSMenu *fsmenu = ED_fsmenu_get(); /* refresh system directory list */ - fsmenu_refresh_system_category(ED_fsmenu_get()); + fsmenu_refresh_system_category(fsmenu); - /* Update bookmarks 'valid' state. - * Done here, because it seems BLI_is_dir() can have huge impact on performances - * in some cases, on win systems... See T43684. - */ - fsmenu_refresh_bookmarks_status(ED_fsmenu_get()); + /* Update bookmarks 'valid' state. */ + fsmenu_refresh_bookmarks_status(wm, fsmenu); if (sfile->layout) { sfile->layout->dirty = true; |