summaryrefslogtreecommitdiffstats
path: root/stream/stream_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_file.c')
-rw-r--r--stream/stream_file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c
index 810d8bfa90..93a209ae38 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -113,6 +113,12 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
return STREAM_ERROR;
}
+#if defined(WIN32) || defined(__OS2__)
+ // extract '/' from '/x:/path'
+ if( filename[ 0 ] == '/' && filename[ 1 ] && filename[ 2 ] == ':' )
+ filename++;
+#endif
+
#if defined(__CYGWIN__)|| defined(__MINGW32__)
m |= O_BINARY;
#endif