store bpmn_file_relative_path using correct slashes w/ burnettk

This commit is contained in:
jasquat 2022-11-11 14:22:00 -05:00
parent 37fe391211
commit 5901bae731
2 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,7 @@
from __future__ import annotations
import enum
import os
from dataclasses import dataclass
from dataclasses import field
from typing import Any
@ -50,6 +51,10 @@ class ProcessModelInfo:
return True
return False
# for use with os.path.join so it can work on windows
def id_for_file_path(self) -> str:
return self.id.replace("/", os.sep)
class ProcessModelInfoSchema(Schema):
"""ProcessModelInfoSchema."""

View File

@ -375,7 +375,7 @@ class SpecFileService(FileSystemService):
process_model_info: ProcessModelInfo, bpmn_file_name: str, et_root: _Element
) -> None:
"""Store_bpmn_process_identifiers."""
relative_process_model_path = process_model_info.id
relative_process_model_path = process_model_info.id_for_file_path()
relative_bpmn_file_path = os.path.join(
relative_process_model_path, bpmn_file_name