{"id":108884,"date":"2023-10-11T07:00:00","date_gmt":"2023-10-11T14:00:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/oldnewthing\/?p=108884"},"modified":"2023-10-11T09:08:42","modified_gmt":"2023-10-11T16:08:42","slug":"20231011-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20231011-00\/?p=108884","title":{"rendered":"Why does <CODE>IFileDialog<\/CODE> still show non-filesystem folders when I pass <CODE>FOS_<WBR>FORCE&shy;FILE&shy;SYSTEM<\/CODE>?"},"content":{"rendered":"<p>If you use <code>IFileDialog<\/code> with the <code>FOS_<wbr \/>FORCE\u00adFILE\u00adSYSTEM<\/code> flag, or <code>SHBrowseForFolder<\/code> with the <code>BIF_<wbr \/>RETURN\u00adONLY\u00adFS\u00adDIRS<\/code> flag, the dialog nevertheless shows non-filesystem folders, and if users pick one, they are told &#8220;You can&#8217;t save here.&#8221; Why show users folders that they can&#8217;t pick?<\/p>\n<p>Because they may need to pass through these unpickable folders in order to get something that they <i>can<\/i> pick.<\/p>\n<p>If the folder picker dialogs suppressed unpickable folders, then that would make it impossible to pick any of you local drives because they all live inside the unpickable &#8220;This PC&#8221; node!<\/p>\n<p>Each <code>IShellFolder<\/code> can report that an item could potentially lead to a file system location by setting the <code>SFGAO_<wbr \/>FILE\u00adSYS\u00adANCESTOR<\/code> attribute. If that attribute is reported, then the item will appear in the file picker dialogs. It may not itself be pickable, but it needs to be shown because it potentially leads to pickable items.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Because you need to pass through them to get there.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-108884","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Because you need to pass through them to get there.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/108884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=108884"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/108884\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=108884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=108884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=108884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}