service-manager: Delete the correct handover complete file

Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
This commit is contained in:
Pablo Carranza Velez 2018-10-17 17:38:49 +02:00
parent 047ca2ae68
commit 83b4d5878e

View File

@ -233,7 +233,7 @@ module.exports = class ServiceManager extends EventEmitter
Promise.any _.map handoverCompletePaths, (file) ->
fs.statAsync(file)
.then ->
fs.unlinkAsync(handoverCompletePaths).catch(_.noop)
fs.unlinkAsync(file).catch(_.noop)
.catch ->
if Date.now() < deadline
Promise.delay(pollInterval).then(wait)