From 2adf351825e8d0388cc9c7f0d5fefb17646d3823 Mon Sep 17 00:00:00 2001 From: wieslawsoltes Date: Thu, 25 Jan 2018 08:59:28 +0000 Subject: [PATCH] Updated utilities --- utilities/Utilities.cpp | 6 +++--- utilities/Utilities.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/utilities/Utilities.cpp b/utilities/Utilities.cpp index 6091d84..6b14582 100644 --- a/utilities/Utilities.cpp +++ b/utilities/Utilities.cpp @@ -300,12 +300,12 @@ namespace util return szFullPath; } - BOOL DirectoryExists(LPCTSTR szPath) + BOOL DirectoryExists(const std::wstring& szPath) { - if (_taccess_s(szPath, 0) == 0) + if (_taccess_s(szPath.c_str(), 0) == 0) { struct _stat status; - _tstat(szPath, &status); + _tstat(szPath.c_str(), &status); return (status.st_mode & S_IFDIR) != 0; } return FALSE; diff --git a/utilities/Utilities.h b/utilities/Utilities.h index 727aabc..f17fb31 100644 --- a/utilities/Utilities.h +++ b/utilities/Utilities.h @@ -51,7 +51,7 @@ namespace util std::wstring GetFullPathName(const std::wstring& szFilePath); - BOOL DirectoryExists(LPCTSTR szPath); + BOOL DirectoryExists(const std::wstring& szPath); bool MakeFullPath(const std::wstring& szTargetPath);