@@ -91,7 +91,7 @@ async def resolve_permalink(
9191
9292 Enhanced to detect and handle character-related conflicts.
9393 """
94- file_path_str = str (file_path )
94+ file_path_str = Path (file_path ). as_posix ( )
9595
9696 # Check for potential file path conflicts before resolving permalink
9797 conflicts = await self .detect_file_path_conflicts (file_path_str )
@@ -119,7 +119,7 @@ async def resolve_permalink(
119119 if markdown and markdown .frontmatter .permalink :
120120 desired_permalink = markdown .frontmatter .permalink
121121 else :
122- desired_permalink = generate_permalink (file_path )
122+ desired_permalink = generate_permalink (file_path_str )
123123
124124 # Make unique if needed - enhanced to handle character conflicts
125125 permalink = desired_permalink
@@ -283,7 +283,7 @@ async def update_entity(self, entity: EntityModel, schema: EntitySchema) -> Enti
283283 entity = await self .update_entity_and_observations (file_path , entity_markdown )
284284
285285 # add relations
286- await self .update_entity_relations (str ( file_path ), entity_markdown )
286+ await self .update_entity_relations (file_path . as_posix ( ), entity_markdown )
287287
288288 # Set final checksum to match file
289289 entity = await self .repository .update (entity .id , {"checksum" : checksum })
@@ -374,7 +374,7 @@ async def update_entity_and_observations(
374374 """
375375 logger .debug (f"Updating entity and observations: { file_path } " )
376376
377- db_entity = await self .repository .get_by_file_path (str ( file_path ))
377+ db_entity = await self .repository .get_by_file_path (file_path . as_posix ( ))
378378
379379 # Clear observations for entity
380380 await self .observation_repository .delete_by_fields (entity_id = db_entity .id )
@@ -498,7 +498,7 @@ async def edit_entity(
498498
499499 # Update entity and its relationships
500500 entity = await self .update_entity_and_observations (file_path , entity_markdown )
501- await self .update_entity_relations (str ( file_path ), entity_markdown )
501+ await self .update_entity_relations (file_path . as_posix ( ), entity_markdown )
502502
503503 # Set final checksum to match file
504504 entity = await self .repository .update (entity .id , {"checksum" : checksum })
0 commit comments