[arvados] updated: 2.6.0-194-g790e737b8

git repository hosting git at public.arvados.org
Tue May 30 18:58:48 UTC 2023


Summary of changes:
 lib/crunchrun/copier.go | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

       via  790e737b8c020f7a339ca88ee6106ae157c465fe (commit)
      from  ff22334d01e09b0074be6416f9285dae8d5af565 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 790e737b8c020f7a339ca88ee6106ae157c465fe
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Tue May 30 14:58:13 2023 -0400

    20561: Don't fail when inspecting a file outside the output directory
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/lib/crunchrun/copier.go b/lib/crunchrun/copier.go
index d440b8f8d..734b2c282 100644
--- a/lib/crunchrun/copier.go
+++ b/lib/crunchrun/copier.go
@@ -161,7 +161,20 @@ func (cp *copier) walkMount(dest, src string, maxSymlinks int, walkMountsBelow b
 	// srcRelPath is the path to the file/dir we are trying to
 	// copy, relative to its mount point -- ".", "./foo.txt", ...
 	srcRelPath := filepath.Join(".", srcMount.Path, src[len(srcRoot):])
-	outputRelPath := src[len(cp.ctrOutputDir):]
+
+	// outputRelPath is the path relative in the output directory
+	// that corresponds to the path in the output collection where
+	// the file will go, for logging
+	var outputRelPath = ""
+	if strings.HasPrefix(src, cp.ctrOutputDir) {
+		outputRelPath = strings.TrimPrefix(src[len(cp.ctrOutputDir):], "/")
+	}
+	if outputRelPath == "" {
+		// blank means copy a whole directory, so replace it
+		// with a wildcard to make it a little clearer what's
+		// going on since outputRelPath is only used for logging
+		outputRelPath = "*"
+	}
 
 	switch {
 	case srcMount.ExcludeFromOutput:

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list