]> granicus.if.org Git - transmission/commit
Add unit tests uncovering improper UNC paths resolution
authorMike Gelfand <mikedld@mikedld.com>
Wed, 24 Jan 2018 20:06:21 +0000 (23:06 +0300)
committerMike Gelfand <mikedld@mikedld.com>
Wed, 24 Jan 2018 20:12:17 +0000 (23:12 +0300)
commit6da66298879ccb939cb0bbb32c1baf1ef062efed
treeebc13ae17f803a9f0b883d86385c132c25eae1f4
parent99c9b90965a01b17e2305a3be72e11e769cad480
Add unit tests uncovering improper UNC paths resolution

While resolved paths always contain the `\\?\` prefix, it's not always
correct to strip only those 4 chars. In case of UNC paths, the prefix
is actually a bit longer (`\\?\UNC\`) and needs to be replaced with `\\`
instead.

Failing to do so results in invalid paths, e.g. `\\Host\Share\File` becomes
`UNC\Host\Share\File` which totally wrong.
libtransmission/file-test.c