From 1313da346eeb749d08680009f43b4db6266cea23 Mon Sep 17 00:00:00 2001 From: ChrisMcKenzie Date: Wed, 2 Dec 2015 18:53:44 -0800 Subject: [PATCH] add error handling for file installer --- dropship/installer_file.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dropship/installer_file.go b/dropship/installer_file.go index 55ca4c2..0fc1114 100644 --- a/dropship/installer_file.go +++ b/dropship/installer_file.go @@ -10,7 +10,11 @@ import ( type FileInstaller struct{} func (i FileInstaller) Install(dest string, f io.Reader) (count int, err error) { - moveOld(dest) + err = moveOld(dest) + if err != nil { + return 0, err + } + if f == nil { return count, ErrNilReader }