vlc | branch: master | Steve Lhomme <[email protected]> | Tue Oct 17 16:23:14 2017 +0200| [e7ae183c7d73e32e8fd5553a7585dc3f443df17e] | committer: Jean-Baptiste Kempf
win32: filesystem: transform UNIX permissions into Windows flags for _wopen() Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e7ae183c7d73e32e8fd5553a7585dc3f443df17e --- src/win32/filesystem.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/win32/filesystem.c b/src/win32/filesystem.c index 29a7a3fc4d..8d56cc859a 100644 --- a/src/win32/filesystem.c +++ b/src/win32/filesystem.c @@ -81,7 +81,13 @@ int vlc_open (const char *filename, int flags, ...) va_start (ap, flags); if (flags & O_CREAT) - mode = va_arg (ap, int); + { + int unixmode = va_arg(ap, int); + if (unixmode & 0444) + mode |= _S_IREAD; + if (unixmode & 0222) + mode |= _S_IWRITE; + } va_end (ap); /* _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
