mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-06-11 00:14:56 +03:00
fix(form-add): resolve directory path to sibling .xml file
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user