# HG changeset patch # User Adrian Buehlmann <adr...@cadifra.com> # Date 1250200892 -7200 # Branch stable # Node ID 560870a155be106daf92e06abf4c9fda80fa9ddc # Parent 943019bebd82519756ac34111ce8759f81997b48 shellext: use system PathIsDirectory in IsDirectory
diff --git a/win32/shellext/TortoiseUtils.cpp b/win32/shellext/TortoiseUtils.cpp --- a/win32/shellext/TortoiseUtils.cpp +++ b/win32/shellext/TortoiseUtils.cpp @@ -8,6 +8,8 @@ #include <io.h> #include "FCNTL.H" +#include "shlwapi.h" + LPWSTR hf_mbtowc(LPWSTR lpw, LPCSTR lpa, int nChars) { @@ -150,11 +152,7 @@ std::string GetTemporaryFile(LPCTSTR pre bool IsDirectory(const std::string& filename) { - DWORD attributes = GetFileAttributesA(filename.c_str()); - if (attributes == INVALID_FILE_ATTRIBUTES) - return false; - - return (attributes & FILE_ATTRIBUTE_DIRECTORY) != 0; + return ::PathIsDirectory(filename.c_str()) != 0; } ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop