@@ -89,7 +89,7 @@ type unpackHandler interface {
8989// Types used to abstract copyActionStore, copyRunDirectory and github.com/otiai10/copy.Copy
9090type copyActionStoreFunc func (log * logger.Logger , newHome string ) error
9191type copyRunDirectoryFunc func (log * logger.Logger , oldRunPath , newRunPath string ) error
92- type fileDirCopyFunc func (from , to string , opts ... copy .Options ) error
92+ type fileDirCopyFunc func (from , to string , opts ... filecopy .Options ) error
9393
9494// Types used to abstract stdlib functions
9595type mkdirAllFunc func (name string , perm fs.FileMode ) error
@@ -155,7 +155,7 @@ func NewUpgrader(log *logger.Logger, settings *artifact.Config, upgradeConfig *c
155155 isDiskSpaceErrorFunc : upgradeErrors .IsDiskSpaceError ,
156156 extractAgentVersion : extractAgentVersion ,
157157 copyActionStore : copyActionStoreProvider (os .ReadFile , os .WriteFile ),
158- copyRunDirectory : copyRunDirectoryProvider (os .MkdirAll , copy .Copy ),
158+ copyRunDirectory : copyRunDirectoryProvider (os .MkdirAll , filecopy .Copy ),
159159 }, nil
160160}
161161
@@ -805,7 +805,7 @@ func shutdownCallback(l *logger.Logger, homePath, prevVersion, newVersion, newHo
805805 newRelPath = strings .ReplaceAll (newRelPath , oldHome , newHome )
806806 newDir := filepath .Join (newHome , newRelPath )
807807 l .Debugf ("copying %q -> %q" , processDir , newDir )
808- if err := copyDir (l , processDir , newDir , true , copy .Copy ); err != nil {
808+ if err := copyDir (l , processDir , newDir , true , filecopy .Copy ); err != nil {
809809 return err
810810 }
811811 }
0 commit comments