mpv/test
wm4 31acec5438 path: change win32 semantics for joining drive-relative paths
win32 is a cursed abomination which has "drive letters" at the root of
the filesystem namespace for no reason. This requires special handling
beyond tolerating the idiotic "\" path separator.

Even more cursed is the fact that a path starting with a drive letter
can be a relative path. For example, "c:billsucks" is actually a
relative path to the current working directory of the C drive. So for
example if the current working directory is "c:/windowsphone", then
"c:billsucks" would reference "c:/windowsphone/billsucks".

You should realize that win32 is a ridiculous satanic trash fire by the
point you realize that win32 has at least 26 current working
directories, one for each drive letter.

Anyway, the actual problem is that mpv's mp_path_join() function would
return a relative path if an absolute relative path is joined with a
drive-relative path. This should never happen; I bet it breaks a lot of
assumptions (maybe even some security or safety relevant ones, but
probably not).

Since relative drive paths are such a fucked up shit idea, don't try to
support them "properly", and just solve the problem at hand. The
solution produces a path that should be invalid on win32.

Joining two relative paths still behaves the same; this is probably OK
(maybe).

The change isn't very minimal due to me rewriting parts of it without
strict need, but I don't care.

Note that the Python os.path.join() function (after which the mpv
function was apparently modeled) has the same problem.
2020-02-06 14:10:40 +01:00
..
ref test: add tests for zimg RGB repacking 2019-11-09 01:55:13 +01:00
chmap.c test: merge test_helpers.c and index.c 2019-11-08 20:34:07 +01:00
gl_video.c test: merge test_helpers.c and index.c 2019-11-08 20:34:07 +01:00
img_format.c test: add tests for zimg RGB repacking 2019-11-09 01:55:13 +01:00
input-gamepad.conf input: add gamepad support through SDL2 2019-10-23 09:40:30 +02:00
json.c test: merge test_helpers.c and index.c 2019-11-08 20:34:07 +01:00
linked_list.c test: merge test_helpers.c and index.c 2019-11-08 20:34:07 +01:00
paths.c path: change win32 semantics for joining drive-relative paths 2020-02-06 14:10:40 +01:00
scale_sws.c test: add tests for zimg RGB repacking 2019-11-09 01:55:13 +01:00
scale_test.c test: add tests for zimg RGB repacking 2019-11-09 01:55:13 +01:00
scale_test.h test: add tests for zimg RGB repacking 2019-11-09 01:55:13 +01:00
scale_zimg.c test: add tests for zimg RGB repacking 2019-11-09 01:55:13 +01:00
subtimes.js command: add sub-start & sub-end properties 2019-09-22 09:19:45 +02:00
tests.c test: add some path handling tests 2020-02-06 13:50:41 +01:00
tests.h test: add some path handling tests 2020-02-06 13:50:41 +01:00