diff --git a/databroker/_core.py b/databroker/_core.py index 30e99cb62..a7f66c525 100644 --- a/databroker/_core.py +++ b/databroker/_core.py @@ -1898,12 +1898,14 @@ def export(self, headers, db, new_root=None, copy_kwargs=None): db.mds.insert_run_stop(**_sanitize(header['stop'])) # insert assets res_uids = self.get_resource_uids(header) + for uid in res_uids: fps = self.reg.copy_files(uid, new_root=new_root, **copy_kwargs) file_pairs.extend(fps) res = self.reg.resource_given_uid(uid) r_path = res['resource_path'] + out_root = new_root if os.path.isabs(r_path): if not res['root']: r_path = os.path.relpath(r_path, os.path.sep)