winpr: fix PathFileExists on UWP
This commit is contained in:
parent
9211f44e46
commit
2201ac5266
@ -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 */
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user