bee icon indicating copy to clipboard operation
bee copied to clipboard

Update Command - Check the download is successful before deleting the existing folder

Open yorkshire-pudding opened this issue 2 years ago • 2 comments
trafficstars

This is a subtask of https://github.com/backdrop-contrib/bee/issues/111 and relates to the issue-111-update-command branch.

At present the update command deletes the folder and then uses the download_bee_callback() function to re-download the module. If there is a connection issue to GitHub then this could break the site. There is a higher risk of a download failure if multiple projects are being downloaded in close succession.

We should use a temporary folder and check that it is valid before replacing the code.

yorkshire-pudding avatar Jun 27 '23 07:06 yorkshire-pudding

@yorkshire-pudding I think that this is going to require a rewrite of the existing download command so that it supports using a temporary download folder and also downloading projects that already exists.

hosef avatar Nov 22 '23 21:11 hosef

@hosef - the first of those is already in place - it downloads to a temporary directory before copying to the destination and deleting the temporary directory. However, I think you are probably right that it makes sense to make the change in the download function. Despite assigning myself, I haven't had chance to look at this for months.

yorkshire-pudding avatar Nov 23 '23 08:11 yorkshire-pudding