Skip to content

Enhance file merging functionality in _merge_publish_into_bin to notify when overwriting existing files. Update _ensure_path_registered to append the correct destination path for third-party extension directories.#3255

Merged
jmcouffin merged 1 commit intodevelopfrom
fix/touch-up-to-extension-tool
Apr 2, 2026

Conversation

@jmcouffin
Copy link
Copy Markdown
Contributor

No description provided.

…fy when overwriting existing files. Update _ensure_path_registered to append the correct destination path for third-party extension directories.
Copy link
Copy Markdown
Contributor

@devloai devloai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary:

  • Adds an overwrite notification in _merge_publish_into_bin when a file is being replaced during the build merge step.
  • Fixes _ensure_path_registered to store the original dest_path in config instead of the normcase()-processed (lowercased on Windows) norm_dest.

Review Summary:

Both changes are small, correct, and well-scoped. The script.py fix addresses a real bug: the old code appended norm_dest (the result of os.path.normcase(os.path.normpath(dest_path))) to the config list, which on Windows produces an all-lowercase path — visually wrong and potentially inconsistent with how pyRevit discovers extensions by path comparison. The fix correctly stores the human-readable original path. The _labs.py change is purely informational, adding build-time visibility when files are overwritten during dependency merging. No issues found with IronPython 2.7 compatibility (the extension script uses # -*- coding: utf-8 -*- and no IP2-incompatible constructs), PEP 8 naming, or black formatting.

Suggestions

  • Add a os.path.abspath call on dest_path before passing it into _ensure_path_registered to handle relative paths robustly. Apply
  • Add a blank line before the _get_default_ext_dir function definition (line 70) to satisfy PEP 8 two-blank-line rule between top-level functions. Apply

@jmcouffin jmcouffin merged commit 1457eae into develop Apr 2, 2026
1 check passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

📦 New public release are available for 6.3.0.26092+2248

@jmcouffin jmcouffin deleted the fix/touch-up-to-extension-tool branch April 8, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant