Boost C++ Libraries: Ticket #10145: Win2k8R2 specific: boost::filesystem::is_directory() returns false for a directory under C:\Windows\System32 https://svn.boost.org/trac10/ticket/10145 <p> 'filesystem::is_directory()' returns false for a directory with whole bunch of sibling directories. Run the following commands to create 2000 sub-directories: </p> <p> C:\&gt;mkdir temp_dir C:\&gt;cd temp_dir C:\&gt;for /L %i in (1, 1, 2000) do mkdir test_dir_%i C:\&gt;mkdir test_dir </p> <p> Now try to execute the following statements under a debugger: 'is_directory()' always returns false. </p> <p> boost::filesystem::path directory("C:<br />temp_dir<br />test_dir"); bool isDir = boost::filesystem::is_directory(directory); </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10145 Trac 1.4.3 Martin Ghazaryan <martin.ghazaryan@…> Wed, 25 Jun 2014 12:08:53 GMT <link>https://svn.boost.org/trac10/ticket/10145#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10145#comment:1</guid> <description> <p> Wrapping the above reproduction procedure into a code block (sorry, should've done originally): </p> <pre class="wiki">C:\&gt;mkdir temp_dir C:\&gt;cd temp_dir C:\&gt;for /L %i in (1, 1, 2000) do mkdir test_dir_%i C:\&gt;mkdir test_dir Now try to execute the following statements under a debugger: 'is_directory()' always returns false. boost::filesystem::path directory("C:\\temp_dir\\test_dir"); bool isDir = boost::filesystem::is_directory(directory); </pre> </description> <category>Ticket</category> </item> <item> <author>Martin Ghazaryan <martin.ghazaryan@…></author> <pubDate>Wed, 25 Jun 2014 14:14:00 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10145#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10145#comment:2</guid> <description> <p> Want to close this as "not an issue" -- I wasn't able to reproduce this on other systems. </p> </description> <category>Ticket</category> </item> <item> <author>Martin Ghazaryan <martin.ghazaryan@…></author> <pubDate>Wed, 25 Jun 2014 14:54:59 GMT</pubDate> <title>summary changed https://svn.boost.org/trac10/ticket/10145#comment:3 https://svn.boost.org/trac10/ticket/10145#comment:3 <ul> <li><strong>summary</strong> <span class="trac-field-old">boost::filesystem::is_directory() returns false for a directory in Windows</span> → <span class="trac-field-new">Win2k8R2 specific: boost::filesystem::is_directory() returns false for a directory under C:\Windows\System32</span> </li> </ul> <p> Changed the summary correspondingly; here're the exact reproduction steps: </p> <pre class="wiki">C:\&gt;mkdir C:\Windows\System32\test_dir Now try to execute the following statements under a debugger: 'is_directory()' always returns false for some weird reason. boost::filesystem::path dirPath("C:\\Windows\\System32\\test_dir"); bool isDir = boost::filesystem::is_directory(dirPath); </pre><p> Note that things work as expected when the directory is created under 'C:\Windows\System', which features permissions identical to 'C:\Windows\System32': </p> <pre class="wiki">C:\&gt;mkdir C:\Windows\System\test_dir 'is_directory()' normally returns true when passing over the following statements: boost::filesystem::path dirPath("C:\\Windows\\System\\test_dir"); bool isDir = boost::filesystem::is_directory(dirPath); </pre> Ticket anonymous Wed, 25 Jun 2014 15:30:52 GMT <link>https://svn.boost.org/trac10/ticket/10145#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10145#comment:4</guid> <description> <p> Might this be due to the Windows File System Redirector that will redirect access to those paths for 32-bit binaries? I'd include a link, but it thinks it is spam, so just search for "msdn File System Redirector" and you'll find it. </p> </description> <category>Ticket</category> </item> <item> <author>Martin Ghazaryan <martin.ghazaryan@…></author> <pubDate>Wed, 25 Jun 2014 17:46:53 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10145#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10145#comment:5</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/10145#comment:4" title="Comment 4">anonymous</a>: </p> <blockquote class="citation"> <p> Might this be due to the Windows File System Redirector that will redirect access to those paths for 32-bit binaries? I'd include a link, but it thinks it is spam, so just search for "msdn File System Redirector" and you'll find it. </p> </blockquote> <p> Oh, man, sure that's it! I get caught on WOW64 thingies every now and then; sorry for bothering. The ticket can freely be closed/rejected. </p> </description> <category>Ticket</category> </item> </channel> </rss>