tilemill-project / millstone

middleware for map styles and datasources
BSD 3-Clause "New" or "Revised" License
32 stars 37 forks source link

Fix metafile idempotence #108

Closed dboze closed 11 years ago

dboze commented 11 years ago

add_item_to_metafile() was using fs/path.exists() incorrectly, resulting in a short circuit to the function's second condition (else). Therefore, the metafile could only contain a single key-value and could not be updated using the add_item_to_metafile() function. exists() now calls a callback rather than expecting a boolean value. add_item_to_metafile() now also accepts a key rather than it being hard-coded as 'unzipped_file' so the function may be used elsewhere.

This branch passes all tests.

Thanks!

springmeyer commented 11 years ago

Thanks for catching this bug!