[libbdplus-devel] win32: use CreateDirectoryW()

anonymous git at videolan.org
Fri Mar 24 11:34:35 CET 2017


libbdplus | branch: master | anonymous <anonymous at anonymous.org> | Fri Mar 24 11:55:11 2017 +0200| [0b61b5b054b06617e564d9ecc5ad99b5687910c4] | committer: anonymous

win32: use CreateDirectoryW()

> http://git.videolan.org/gitweb.cgi/libbdplus.git/?a=commit;h=0b61b5b054b06617e564d9ecc5ad99b5687910c4
---

 src/file/dirs_win32.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/file/dirs_win32.c b/src/file/dirs_win32.c
index 009f046..d73796a 100644
--- a/src/file/dirs_win32.c
+++ b/src/file/dirs_win32.c
@@ -38,7 +38,10 @@ int win32_mkdir(const char *dir)
     wchar_t wdir[MAX_PATH];
 
     MultiByteToWideChar(CP_UTF8, 0, dir, -1, wdir, MAX_PATH);
-    return _wmkdir(wdir);
+
+    if (!CreateDirectoryW(wdir, NULL))
+      return -1;
+    return 0;
 }
 
 char *file_get_config_home(void)



More information about the libbdplus-devel mailing list