1
1

Fix T85689: Assume Win32 Volumes are Valid

Skip validation when inserting items into the Win32 "Volumes" list.
This fixes some long hangs when launching Blender with disconnected
network shares.

See D14506 for more details.

Differential Revision: https://developer.blender.org/D14506

Reviewed by Brecht Van Lommel
This commit is contained in:
2022-03-30 11:10:15 -07:00
parent 49bc640b76
commit 84fde382e4
2 changed files with 14 additions and 2 deletions

View File

@@ -216,6 +216,8 @@ typedef enum FSMenuInsert {
FS_INSERT_FIRST = (1 << 2),
/** just append to preserve delivered order */
FS_INSERT_LAST = (1 << 3),
/** Do not validate the link when inserted. */
FS_INSERT_NO_VALIDATE = (1 << 4),
} FSMenuInsert;
struct FSMenu;

View File

@@ -463,7 +463,12 @@ void fsmenu_insert_entry(struct FSMenu *fsmenu,
ED_fsmenu_entry_set_icon(fsm_iter, icon);
fsmenu_entry_refresh_valid(fsm_iter);
if (flag & FS_INSERT_NO_VALIDATE) {
fsm_iter->valid = true;
}
else {
fsmenu_entry_refresh_valid(fsm_iter);
}
if (fsm_prev) {
if (flag & FS_INSERT_FIRST) {
@@ -689,7 +694,12 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks)
break;
}
fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, tmps, name, icon, FS_INSERT_SORTED);
fsmenu_insert_entry(fsmenu,
FS_CATEGORY_SYSTEM,
tmps,
name,
icon,
FS_INSERT_SORTED | FS_INSERT_NO_VALIDATE);
}
}