diff options
Diffstat (limited to 'windirstat/mountpoints.cpp')
-rw-r--r-- | windirstat/mountpoints.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/windirstat/mountpoints.cpp b/windirstat/mountpoints.cpp index fcd0d05..deebc65 100644 --- a/windirstat/mountpoints.cpp +++ b/windirstat/mountpoints.cpp @@ -225,20 +225,25 @@ bool CReparsePoints::IsVolumeMountPoint(CString path) // Check whether the current item is a junction point but no volume mount point // as the latter ones are treated differently (see above). -bool CReparsePoints::IsFolderJunction(CString path) +bool CReparsePoints::IsFolderJunction(DWORD attr) { - if(IsVolumeMountPoint(path)) + if (attr == INVALID_FILE_ATTRIBUTES) { return false; } - DWORD attr = ::GetFileAttributes(path); - if(attr == INVALID_FILE_ATTRIBUTES) + return ((attr & FILE_ATTRIBUTE_REPARSE_POINT) != 0); +} + +// ... same as before, but based on the full path +bool CReparsePoints::IsFolderJunction(CString path) +{ + if(IsVolumeMountPoint(path)) { return false; } - return ((attr & FILE_ATTRIBUTE_REPARSE_POINT) != 0); + return IsFolderJunction(::GetFileAttributes(path)); } bool CReparsePoints::IsVolumeMountPoint(CString volume, CString path) |