id summary reporter owner description type status milestone component version severity resolution keywords cc 13428 "Windows: ""is_symlink"" for drive letter (without trailing directory separator) returns the wrong result" m.kosch@… Beman Dawes "Suppose you have a normal directory {{{Dir}}} and a symlink named {{{SymlinkToDir}}} which points to {{{Dir}}} on drive {{{C:\}}}. The following two tests lead to different results: {{{ boost::filesystem::path fsPathToSymlink(""C:\\SymlinkToDir""); boost::filesystem::path fsPathToDrive(""C:""); current_path(fsPathToDrive + ""\\""); bool b1 = is_symlink(fsPathToDrive); assert( b1 == false ); current_path(fsPathToSymlink); bool b2 = is_symlink(fsPathToDrive); assert( b2 == true ); }}} It seems that Windows differentiates between {{{C:}}} and {{{C:\}}}. The first form seems to denote the current directory on drive {{{C:\}}} while the second form seems to denote drive {{{C:\}}} itself. This also can be observed in the Windows command promt. {{{is_symlink}}} internally uses {{{GetFileAttributesW}}} to determine the symlink status. {{{GetFileAttributes(""C:"")}}} returns the file attributes of {{{C:\\SymlinkToDir}}} instead of {{{C:\}}}. The function {{{is_symlink}}} is used to implement other functions, so this problem also effects at least the following other functions, possibly even many more: * {{{canonical}}} returns {{{BOOST_ERROR_NOT_SUPPORTED}}} for an absolute path, if compiled for Windows versions earlier than Windows Vista ({{{_WIN32_WINNT < 0x0600}}}) and the current directory represents a symlink. * {{{weakly_canonical}}} in the same scenario as above, because this utilizes {{{canonical}}}." Bugs new To Be Determined filesystem Boost 1.66.0 Problem symlink is_symlink canonical weakly_canonical GetFileAttributes GetFileAttributesW m.kosch@…