mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-24 13:41:01 +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:
co-authored by
Claude Opus 4.6
parent
d9ce7b03cc
commit
c5abfc3a4f
@@ -48,7 +48,9 @@ def main():
|
|||||||
|
|
||||||
# --- Phase 1: Determine object type ---
|
# --- 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)
|
print(f"Файл объекта не найден: {object_path}", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user