bluesky / ophyd

hardware abstraction in Python with an emphasis on EPICS
https://blueskyproject.io/ophyd
BSD 3-Clause "New" or "Revised" License
49 stars 78 forks source link

FileStoreBase write_path_template cannot be "." if read_path_template is None #1146

Closed DiamondJoseph closed 8 months ago

DiamondJoseph commented 1 year ago

Resolving read_path_template uses self.write_path_template, which is the already resolved self._write_path_template

"." throws an exception while formatting the read_path_template, despite already having been checked for being a valid relative path and allowed by write_path_template https://github.com/bluesky/ophyd/blob/5c413cc0848ef035b9839de328064d6af47b589b/ophyd/areadetector/filestore_mixins.py#L247

Potential fix:

@property
    def read_path_template(self):
        "Returns write_path_template if read_path_template is not set"
        rootp = self.reg_root

        if self._read_path_template is None:
            return self.write_path_template