mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-20 02:10:35 +08:00
fd7e280af8
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
38 lines
1018 B
Diff
38 lines
1018 B
Diff
diff --git a/src/file_io.c b/src/file_io.c
|
|
index e5762ce8..90ef23d5 100644
|
|
--- a/src/file_io.c
|
|
+++ b/src/file_io.c
|
|
@@ -777,6 +777,21 @@ psf_open_handle (PSF_FILE * pfile)
|
|
return NULL ;
|
|
} ;
|
|
|
|
+#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
|
|
+ if (!pfile->use_wchar)
|
|
+ return NULL ;
|
|
+
|
|
+ CREATEFILE2_EXTENDED_PARAMETERS cfParams = { 0 } ;
|
|
+ cfParams.dwSize = sizeof (CREATEFILE2_EXTENDED_PARAMETERS) ;
|
|
+ cfParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL ;
|
|
+
|
|
+ handle = CreateFile2 (pfile->path.wc, dwDesiredAccess, dwShareMode, dwCreationDistribution, &cfParams) ;
|
|
+
|
|
+ if (handle == INVALID_HANDLE_VALUE)
|
|
+ return NULL ;
|
|
+
|
|
+ return handle ;
|
|
+#else
|
|
if (pfile->use_wchar)
|
|
handle = CreateFileW (
|
|
pfile->path.wc, /* pointer to name of the file */
|
|
@@ -802,6 +817,7 @@ psf_open_handle (PSF_FILE * pfile)
|
|
return NULL ;
|
|
|
|
return handle ;
|
|
+#endif
|
|
} /* psf_open_handle */
|
|
|
|
/* USE_WINDOWS_API */ static void
|
|
--
|
|
2.27.0.windows.1
|
|
|