fix(RenameFile): fix doubled file extension causing 'File name too long' error - #768
Open
garfolino wants to merge 3 commits into
Open
fix(RenameFile): fix doubled file extension causing 'File name too long' error#768garfolino wants to merge 3 commits into
garfolino wants to merge 3 commits into
Conversation
The scene title is rendered by a React-controlled TruncatedText component. The plugin replaced its contents with an <a> element (innerHTML = ''), which detached the text node React updates. Navigating to another scene with Next then left the previous title displayed while every other field updated. Switch to event delegation: a single document-level click listener reads the title at click time, so React's DOM is never restructured. The styling class and tooltip are now applied non-destructively (attributes only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ng filename truncation The truncation branch appended the file extension before computing/adding the hash suffix, so the length budget didn't account for the "_"+hash appended afterward, and the extension got appended a second time later, producing filenames like "....mp4.mp4" that exceeded the OS filename limit and caused OSError: File name too long.
… the log When rename/move failed with an OSError, stash.Error(exitMsg) already logs a clear one-line message, but the code then re-raised the exception, which propagated to the top-level catch-all and dumped the full Python traceback to stderr as a second, noisy Error entry (this is what showed up in the "file name too long" report). Return None instead so only the clear message is surfaced.
garfolino
force-pushed
the
renamefile-fix-long-filename-macos
branch
from
August 29, 2026 21:12
d950ea0 to
a9d3423
Compare
|
This pull request has been mentioned on Stash Forum. There might be relevant details there: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #767
Depends on #733 — this branch is built on top of
fix/renamefile-title-stuck(which bumpsRenameFileto 1.0.1), so this PR's diff includes that PR's commit and bumps the version again to 1.0.2 on top of it. GitHub doesn't allow targeting a base branch that only exists in a fork, so this still shows as based onmain; please merge/land #733 first, or review this diff as the two commits after785fa73.Summary
RenameFileso it no longer doubles the file extension and correctly reserves space for the hash suffix, which was causingOSError: [Errno 63] File name too long(macOS) /ENAMETOOLONGwhen renaming scenes whose formatted filename exceededmax_filename_length.Root cause
See #767 for the full analysis. In short: the truncation branch built
new_filenameastruncated + '_' + hash + extension, but the length budget it truncated to only subtracted the extension length (not the_+hash), and the caller then appended the extension a second time (newFilenameWithExt = new_filename + suffix), producing filenames like....mp4.mp4well pastmax_filename_length.Testing
max_filename_length, with a single extension.node ./validator/index.js --ci) — passes.AI disclosure
This fix (analysis, code changes, issue text, and this PR description) was drafted with LLM (Claude) assistance from a real user-reported error log. The diff was reviewed by a human before submission, per the repo's LLM-assisted contribution policy.