juju/juju — pull request #402 by davecheney (2014-07-25 03:14:35+00:00)
Title: configstore: use O_TRUNC when rewriting jenv file 

Fixes LP #1348458

Because thumper was determined not to write a temporary file then move it, we have to ensure that iff we rewrite the .jenv file, the contents of the existing file are truncated before writing to prevent future readers of the file seeing corrupt data at the end of the file.