Comment 1 for bug 59968

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 59968] control char filename causes "parse error"

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David R Dick wrote:
> Public bug reported:
>
> WHAT HAPPENED:
> When a directory name that consisted of a single
> control character (control-C was observed) was seen
> by a 'bzr add' command, some subsequent commands
> failed with an error in ElementTree().parse.
>
> ANALYSIS:
> I examined .bzr/checkout/inventory at a line referenced
> in an error message and found a name element that looked like it contained '^C'. Upon examining the directory on the disk, I found a directory with a questionable, single-character name. Deleting it and starting clean with bzr got around the problem.
>
> FIX:
> Either the name should be canonicalized (encoded in
> a safe form that all code which uses it knows about),
> and/or a warning should be provided when the file/directory is first "bzr added".

This root cause of this problem is that we store this data in XML, and
XML1.0 doesn't permit most ASCII control codes.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFFBeM+0F+nu1YWqI0RAglDAJwMDlH93/nV1o6lTLIDd5UVXas4wACeK8r4
rJUJKZCajmqPVWezlx6JWLc=
=z+4k
-----END PGP SIGNATURE-----