clowd / Clowd.Squirrel

Quick and easy installer and automatic updates for cross-platform dotnet applications
426 stars 39 forks source link

Mark a directory incomplete when staging updates #182

Closed caesay closed 11 months ago

caesay commented 1 year ago

There is still a possible problem that if Squirrel crashes while staging updates, a restarted squirrel might think it's a valid update and try to update to it.

We could create a squirrel.incomplete file in that directory, and delete it after the update has been fully staged. That way, future restarted squirrel will ignore any folder with this file in it and not update to a broken install dir.

I've also planned to include a file manifest in the squirrel package nuspec, so an alternative solution could be to verify the directory against the manifest before completing the update.

Noah1989 commented 1 year ago

I have exactly this issue when dealing with a full disk. Staging crashes due to no space and then it updates to the folder with half of the files missing. Has work on this already started?

KennyTK commented 1 year ago

This function has been implemented in squirrel.windows but needs to be carried over. 1862