Merge branch 'master' into 7661-fuse-by-pdh
[arvados.git] / services / fuse / arvados_fuse / fusedir.py
index 8ffca49601d795fc0622326e04eb219dd3dd0d8d..c078242980a17d0d9e83a20821d84c8687960bd9 100644 (file)
@@ -496,10 +496,11 @@ point the collection will actually be looked up on the server and the directory
 will appear if it exists.
 """.lstrip()
 
-    def __init__(self, parent_inode, inodes, api, num_retries):
+    def __init__(self, parent_inode, inodes, api, num_retries, pdh_only=False):
         super(MagicDirectory, self).__init__(parent_inode, inodes)
         self.api = api
         self.num_retries = num_retries
+        self.pdh_only = pdh_only
 
     def __setattr__(self, name, value):
         super(MagicDirectory, self).__setattr__(name, value)
@@ -517,7 +518,7 @@ will appear if it exists.
         if k in self._entries:
             return True
 
-        if not portable_data_hash_pattern.match(k) and not uuid_pattern.match(k):
+        if not portable_data_hash_pattern.match(k) and (self.pdh_only or not uuid_pattern.match(k)):
             return False
 
         try: