Merge branch 'remove-posixpath' into 'v3'

Move from posix path to os path

See merge request openflexure/openflexure-microscope-server!552
This commit is contained in:
Julian Stirling 2026-03-25 12:57:10 +00:00
commit c4cee38923

View file

@ -4,7 +4,7 @@ The microscope can be extended to be used with other hardware by creating a pack
with other Things and including them in the LabThings-FastAPI config file.
"""
import posixpath
import os
from typing import Optional, Self
import labthings_fastapi as lt
@ -23,7 +23,9 @@ class OFMThing(lt.Thing):
if application_config is None:
raise ValueError("No application configuration was supplied.")
app_data_dir = application_config["data_folder"]
self._data_dir = posixpath.join(str(app_data_dir), self.path.strip("/"))
self._data_dir = os.path.join(
os.path.normpath(str(app_data_dir)), os.path.normpath(self.path.strip("/"))
)
return self
@property