Opened 8 years ago
Last modified 8 years ago
#10145 new Bugs
Win2k8R2 specific: boost::filesystem::is_directory() returns false for a directory under C:\Windows\System32
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | filesystem |
Version: | Boost 1.55.0 | Severity: | Problem |
Keywords: | Cc: |
Description
'filesystem::is_directory()' returns false for a directory with whole bunch of sibling directories. Run the following commands to create 2000 sub-directories:
C:\>mkdir temp_dir C:\>cd temp_dir C:\>for /L %i in (1, 1, 2000) do mkdir test_dir_%i C:\>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);
Change History (5)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Want to close this as "not an issue" -- I wasn't able to reproduce this on other systems.
comment:3 by , 8 years ago
Summary: | boost::filesystem::is_directory() returns false for a directory in Windows → Win2k8R2 specific: boost::filesystem::is_directory() returns false for a directory under C:\Windows\System32 |
---|
Changed the summary correspondingly; here're the exact reproduction steps:
C:\>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);
Note that things work as expected when the directory is created under 'C:\Windows\System', which features permissions identical to 'C:\Windows\System32':
C:\>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);
follow-up: 5 comment:4 by , 8 years ago
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.
comment:5 by , 8 years ago
Replying to anonymous:
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.
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.
Wrapping the above reproduction procedure into a code block (sorry, should've done originally):