Skip to content

Commit 4ab7d6b

Browse files
stammenminggo
authored and
minggo
committed
fix for missing GetFullPathNameA function in Win10 UWP (#278)
1 parent 314ccdc commit 4ab7d6b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

flatbuffers/util.h

+4
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ inline std::string AbsolutePath(const std::string &filepath) {
222222
#else
223223
#ifdef _WIN32
224224
char abs_path[MAX_PATH];
225+
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
226+
return _fullpath(abs_path, filepath.c_str(), MAX_PATH)
227+
#else
225228
return GetFullPathNameA(filepath.c_str(), MAX_PATH, abs_path, nullptr)
229+
#endif
226230
#else
227231
char abs_path[PATH_MAX];
228232
return realpath(filepath.c_str(), abs_path)

0 commit comments

Comments
 (0)