Readify / TeamFlash

Build light driver for TeamCity + Delcom 904003 USB light
https://tc.readifycloud.com/viewLog.html?buildTypeId=bt10&buildId=lastSuccessful&tab=artifacts&guest=1
17 stars 16 forks source link

XML config gets corrupted when config file size drops #17

Closed mavadat closed 9 years ago

mavadat commented 9 years ago

Issue

XML config file (currently misleadingly named as config.json) can get corrupted. It appears to happen when size XML config is changed and the new file is smaller in terms of size.

TeamFlash appear to open config file for write, and then write new config over existing config. If new config is bigger in size then all good; however, when new config is smaller then left-overs from previous config file result into corrupted XML config file.

What to Do

Over-write. So that previous content is wiped out in favor of fresh new XML content.

mavadat commented 9 years ago

Submitted PR to address this issue.

aaronpowell commented 9 years ago

PR merged, thanks @mavadat :)