]> granicus.if.org Git - transmission/commit
Fix UNC paths resolution on Windows
authorMike Gelfand <mikedld@mikedld.com>
Wed, 24 Jan 2018 20:10:21 +0000 (23:10 +0300)
committerMike Gelfand <mikedld@mikedld.com>
Wed, 24 Jan 2018 20:45:08 +0000 (23:45 +0300)
commit3106675261cf0727c608f41c66ae3b94aebb974f
tree62fb3e6f7d682948fd3e1cc7c8e62f454ab698ae
parent6da66298879ccb939cb0bbb32c1baf1ef062efed
Fix UNC paths resolution on Windows

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-win32.c
libtransmission/utils.c
libtransmission/utils.h