[mkbundle] Encode directory separator character on Windows (#4493)
authorMarek Habersack <grendel@twistedcode.net>
Thu, 9 Mar 2017 15:25:08 +0000 (16:25 +0100)
committerJonathan Pryor <jonpryor@vt.edu>
Thu, 9 Mar 2017 15:25:08 +0000 (10:25 -0500)
commit21dec720833d6cb4b6f13cf604ca1c3d1b811dc9
tree1be8d627db0fb621d870a05697b53749d01fd96e
parenteff552d9bd39e25fae2e75e6febeb1d3ab0e18ba
[mkbundle] Encode directory separator character on Windows (#4493)

When storing satellite assemblies, mkbundle prefixes their names with a
directory name derived from the language/locale of the assembly. It uses the
platform's default directory separator character which on Windows defaults to
'\' and that causes problems when building such a bundle on Windows since \ is
an escape sequence prefix inside strings and not escaping it with another \
leads to gcc errors when building the genrated source.

This commit fixes the problem by quoting the directory separator character
properly on Windows.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52845
mcs/tools/mkbundle/mkbundle.cs