10401: Add integration tests for directory listing behavior.
[arvados.git] / sdk / cwl / arvados_cwl / fsaccess.py
index 2191dcb8df712818cafc24f963f65b2a2a42b9d8..3a3d16073833a6367876b5833b54cbb8f35584e7 100644 (file)
@@ -80,7 +80,10 @@ class CollectionFsAccess(cwltool.stdfsaccess.StdFsAccess):
     def exists(self, fn):
         collection, rest = self.get_collection(fn)
         if collection:
-            return collection.exists(rest)
+            if rest:
+                return collection.exists(rest)
+            else:
+                return True
         else:
             return super(CollectionFsAccess, self).exists(fn)
 
@@ -152,6 +155,8 @@ class CollectionFetcher(DefaultFetcher):
 
     def check_exists(self, url):
         try:
+            if url.startswith("http://arvados.org/cwl"):
+                return True
             if url.startswith("keep:"):
                 return self.fsaccess.exists(url)
             if url.startswith("arvwf:"):