10181: Add Size method to arvados.CollectionFileSystem.
[arvados.git] / services / crunch-run / copier.go
index 4a6253c459de53808203bd97499da561407b07a5..3f529f6313b9ee55483efaa21367572bd54207a4 100644 (file)
@@ -70,22 +70,22 @@ type copier struct {
 func (cp *copier) Copy() (string, error) {
        err := cp.walkMount("", cp.ctrOutputDir, limitFollowSymlinks, true)
        if err != nil {
-               return "", fmt.Errorf("in walkMount: %v", err)
+               return "", fmt.Errorf("error scanning files to copy to output: %v", err)
        }
        fs, err := (&arvados.Collection{ManifestText: cp.manifest}).FileSystem(cp.client, cp.keepClient)
        if err != nil {
-               return "", fmt.Errorf("creating Collection.FileSystem: %v", err)
+               return "", fmt.Errorf("error creating Collection.FileSystem: %v", err)
        }
        for _, d := range cp.dirs {
                err = fs.Mkdir(d, 0777)
                if err != nil && err != os.ErrExist {
-                       return "", fmt.Errorf("Could not Mkdir %v: %v", d, err)
+                       return "", fmt.Errorf("error making directory %q in output collection: %v", d, err)
                }
        }
        for _, f := range cp.files {
                err = cp.copyFile(fs, f)
                if err != nil {
-                       return "", fmt.Errorf("Could not copyFile %v: %v", f, err)
+                       return "", fmt.Errorf("error copying file %q into output collection: %v", f, err)
                }
        }
        return fs.MarshalManifest(".")