44
44
// hash, then copies it into the directory. If a value is received on abort, the
45
45
// download will be stopped.
46
46
func (d *BundlesDir) download(sch *state.Charm, abort <-chan struct{}) (err error) {
47
defer trivial.ErrorContextf(&err, "failed to download charm %q from %q", sch.URL(), sch.BundleURL())
47
defer utils.ErrorContextf(&err, "failed to download charm %q from %q", sch.URL(), sch.BundleURL())
49
49
if err := os.MkdirAll(dir, 0755); err != nil {