diff setup.py @ 18483:ce5f529deb36 stable

largefiles: don't allow corruption to propagate after detection basestore.get uses util.atomictempfile when checking and receiving a new largefile ... but the close/discard logic was too clever for largefiles. Largefiles relied on being able to discard the file and thus prevent it from being written to the store. That was however too brittle. lfutil.copyandhash closes the infile after writing to it ... with a 'blecch' comment. The discard was thus a silent noop, and as a result of that corruption would be detected ... and then the corrupted files would be used anyway. Instead we now use a tmp file and rename or unlink it after validating it. A better solution should be implemented ... but not now.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 28 Jan 2013 15:19:44 +0100
parents 65a46635fb31
children 3f59cb1ccc73
line wrap: on
line diff