Commits

Chris Beaven  committed 3f24aa1

Make the CloudFilesStorage listdir method remove the path from the filenames.

  • Participants
  • Parent commits c96cf44

Comments (0)

Files changed (1)

File backends/mosso.py

         
         If the list of directories is required, use the full_listdir method.
         """
-        return ([], self.container.list_objects(path=path))
+        files = []
+        if path and not path.endswith('/'):
+            path = '%s/' % path
+        path_len = len(path)
+        for name in self.container.list_objects(path=path):
+            files.append(name[path_len:])
+        return ([], files)
 
     def full_listdir(self, path):
         """