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:
commit
c4cee38923
1 changed files with 4 additions and 2 deletions
|
|
@ -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.
|
with other Things and including them in the LabThings-FastAPI config file.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import posixpath
|
import os
|
||||||
from typing import Optional, Self
|
from typing import Optional, Self
|
||||||
|
|
||||||
import labthings_fastapi as lt
|
import labthings_fastapi as lt
|
||||||
|
|
@ -23,7 +23,9 @@ class OFMThing(lt.Thing):
|
||||||
if application_config is None:
|
if application_config is None:
|
||||||
raise ValueError("No application configuration was supplied.")
|
raise ValueError("No application configuration was supplied.")
|
||||||
app_data_dir = application_config["data_folder"]
|
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
|
return self
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue