winpr: fix PathFileExists on UWP

This commit is contained in:
Marc-André Moreau 2016-03-25 12:20:51 -04:00
parent 9211f44e46
commit 2201ac5266
2 changed files with 13 additions and 9 deletions

View File

@ -287,23 +287,25 @@ WINPR_API char* GetCombinedPath(const char* basePath, const char* subPath);
WINPR_API BOOL PathMakePathA(LPCSTR path, LPSECURITY_ATTRIBUTES lpAttributes);
#ifndef WIN32
#if !defined(_WIN32) || defined(_UWP)
WINPR_API BOOL PathFileExistsA(LPCSTR pszPath);
WINPR_API BOOL PathFileExistsW(LPCWSTR pszPath);
#ifdef UNICODE
#define PathFileExists PathFileExistsW
#else
#define PathFileExists PathFileExistsA
#endif
#endif
#ifdef __cplusplus
}
#endif
#ifdef WIN32
#ifdef _WIN32
#include <Shlwapi.h>
#else
#ifdef UNICODE
#define PathFileExists PathFileExistsW
#else
#define PathFileExists PathFileExistsA
#endif
#endif
#endif /* WINPR_PATH_H */

View File

@ -480,7 +480,8 @@ BOOL PathMakePathA(LPCSTR path, LPSECURITY_ATTRIBUTES lpAttributes)
return PathFileExistsA(path);
}
#ifndef WIN32
#if !defined(_WIN32) || defined(_UWP)
BOOL PathFileExistsA(LPCSTR pszPath)
{
struct stat stat_info;
@ -495,4 +496,5 @@ BOOL PathFileExistsW(LPCWSTR pszPath)
{
return FALSE;
}
#endif