diff options
author | James Ross-Gowan <rossymiles@gmail.com> | 2014-04-09 18:14:18 +1000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-09 20:41:51 +0200 |
commit | 17d0609d1e8c36d70b5994e779a364f6df429937 (patch) | |
tree | 78928bcbbef2ce9e660d8f2a1f4df4d0ce77c994 /stream/cache.c | |
parent | 217008be4a821d91f2651f9506321327d8f551bf (diff) | |
download | mpv-17d0609d1e8c36d70b5994e779a364f6df429937.tar.bz2 mpv-17d0609d1e8c36d70b5994e779a364f6df429937.tar.xz |
stream_file: Check the handle for network streams
Use NtQueryVolumeInformationFile instead of GetDriveType for detecting
remote filesystems on Windows. This has the advantage of working
directly on the file handle instead of needing a path and it works
unmodified in Cygwin where the previous code wouldn't understand Cygwin
paths or symlinks.
There is some risk in using NtQueryVolumeInformationFile, since it's an
internal function and its behaviour could change at any time or it could
be removed in a future version of Windows, however it's documented[1] in
the WDK and it's used successfully by Cygwin, so it should be fine. If
it's removed, the code should fail gracefully by treating all files as
local.
[1]: http://msdn.microsoft.com/en-us/library/windows/hardware/ff567070.aspx
Signed-off-by: wm4 <wm4@nowhere>
Diffstat (limited to 'stream/cache.c')
0 files changed, 0 insertions, 0 deletions