From c5abfc3a4f6378eb3fffed4beeac76f8df7c69cb Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Wed, 25 Feb 2026 17:02:56 +0300 Subject: [PATCH] fix(form-add): resolve directory path to sibling .xml file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When ObjectPath is a directory (e.g. Catalogs/Номенклатура), auto-resolve to the sibling XML file (Catalogs/Номенклатура.xml) before parsing. Matches behavior of other edit scripts. Co-Authored-By: Claude Opus 4.6 --- .claude/skills/form-add/scripts/form-add.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.claude/skills/form-add/scripts/form-add.py b/.claude/skills/form-add/scripts/form-add.py index 74f17b30..ef1cc6de 100644 --- a/.claude/skills/form-add/scripts/form-add.py +++ b/.claude/skills/form-add/scripts/form-add.py @@ -48,7 +48,9 @@ def main(): # --- Phase 1: Determine object type --- - if not os.path.exists(object_path): + if os.path.isdir(object_path): + object_path = object_path.rstrip("/\\") + ".xml" + if not os.path.isfile(object_path): print(f"Файл объекта не найден: {object_path}", file=sys.stderr) sys.exit(1)