You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2021/07/09 02:37:51 UTC

[airavata-mft] branch develop updated: Fix checking that child path is a subdirectory of resource path

This is an automated email from the ASF dual-hosted git repository.

dimuthuupe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-mft.git


The following commit(s) were added to refs/heads/develop by this push:
     new 4000b4c  Fix checking that child path is a subdirectory of resource path
4000b4c is described below

commit 4000b4c5d431131de9770d51798e4f25219f45fa
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Jul 7 09:55:51 2021 -0400

    Fix checking that child path is a subdirectory of resource path
---
 .../org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java b/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
index a6e224b..4c187ba 100644
--- a/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
+++ b/transport/scp-transport/src/main/java/org/apache/airavata/mft/transport/scp/SCPMetadataCollector.java
@@ -261,7 +261,7 @@ public class SCPMetadataCollector implements MetadataCollector {
             case DIRECTORY:
                 resourcePath = resource.getDirectory().getResourcePath();
                 if (isChildPath) {
-                    if (!resourcePath.startsWith(childResourcePath)) {
+                    if (!childResourcePath.startsWith(resourcePath)) {
                         throw new Exception("Child path " + childResourcePath + " is not in the parent path " + resourcePath);
                     }
                     resourcePath = childResourcePath;