GoogleCloudPlatform/gsutil — pull request #145 by rameshdharan (2013-06-18 20:52:07+00:00)
Title: Fix gsutil update with paths containing whitespace.

Currently gsutil uses a couple of os.system invocations to ensure that
permissions are set correctly on the new files/directories created
inside GSUTIL_DIR during the update process.

These commands don't work if GSUTIL_DIR has whitespace, which happens in
my case because I install gsutil to ~/Google\ Drive/. Although the
update still succeeds; these os.system commands fail and spew errors to
stdout.

This change fixes the problem by quoting out the whitespace, and using
the find -print0 and xargs -0 variants which are designed to handle this
situation.

I tested it by forcing an update (editing VERSION) and ensuring that the
commands ran correctly without generating errors.