summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-04-01 02:26:34 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-04-01 02:43:47 +0300
commitcf9edda1d370d39bc8a3d020a9c2bc4090d2457e (patch)
tree1d1bbc529a4e8109fb6aa5cadf0dbbb7bd61013a /loader
parent7af8417ae7beb409f54849956a7037bc66c4c334 (diff)
parent1c37a6427abef0827c608d328d37ca1b1a0a022d (diff)
downloadmpv-cf9edda1d370d39bc8a3d020a9c2bc4090d2457e.tar.bz2
mpv-cf9edda1d370d39bc8a3d020a9c2bc4090d2457e.tar.xz
Merge svn changes up to r29117
Diffstat (limited to 'loader')
-rw-r--r--loader/win32.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/loader/win32.c b/loader/win32.c
index 2ee9f1ea7e..3aded84674 100644
--- a/loader/win32.c
+++ b/loader/win32.c
@@ -63,6 +63,8 @@ for DLL to know too much about its environment.
#include <sys/types.h>
#include <dirent.h>
#include <sys/time.h>
+#include <sys/stat.h>
+#include <sys/timeb.h>
#ifdef HAVE_KSTAT
#include <kstat.h>
#endif
@@ -3519,7 +3521,7 @@ static HANDLE WINAPI expCreateFileA(LPCSTR cs1,DWORD i1,DWORD i2,
free(tmp);
return result;
}
- if (strstr(cs1, "vp3"))
+ if (strstr(cs1, "vp3") || strstr(cs1, ".fpf"))
{
int r;
int flg = 0;
@@ -3537,10 +3539,10 @@ static HANDLE WINAPI expCreateFileA(LPCSTR cs1,DWORD i1,DWORD i2,
flg |= O_RDONLY;
else if (GENERIC_WRITE & i1)
{
- flg |= O_WRONLY;
+ flg |= O_WRONLY | O_CREAT;
printf("Warning: openning filename %s %d (flags; 0x%x) for write\n", tmp, r, flg);
}
- r=open(tmp, flg);
+ r=open(tmp, flg, S_IRWXU);
free(tmp);
return r;
}