Skip to content

Commit

Permalink
Ensure that file extension is included when exporting absolute URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Mar 24, 2021
1 parent 3085cca commit b4277ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/lsst/daf/butler/datastores/fileDatastore.py
Expand Up @@ -1703,7 +1703,8 @@ def export(self, refs: Iterable[DatasetRef], *,
# For now go with option 2
if location.pathInStore.isabs():
template = self.templates.getTemplate(ref)
pathInStore = template.format(ref)
pathInStore = ButlerURI(template.format(ref), forceAbsolute=False)
pathInStore = pathInStore.updatedExtension(location.pathInStore.getExtension())

exportUri = directoryUri.join(pathInStore)
exportUri.transfer_from(storeUri, transfer=transfer)
Expand Down

0 comments on commit b4277ac

Please sign in to comment.