Skip to content

Rename the remote transfer directory to winrm-upload-<host> - #151

Merged
bertysentry merged 2 commits into
mainfrom
rename-upload-directory
Jul 29, 2026
Merged

Rename the remote transfer directory to winrm-upload-<host>#151
bertysentry merged 2 commits into
mainfrom
rename-upload-directory

Conversation

@bertysentry

Copy link
Copy Markdown
Contributor

Fixes #150

What

Renames the remote naming scheme inherited from the ancient pre-2.0.0 SMB-share implementation:

Before After
Transfer directory <windir>\Temp\SEN_ShareFor_<CLIENT>$ <windir>\Temp\winrm-upload-<CLIENT>
Cluster temp subdirectory <clusterShare>\Temp\SEN_TempFor_<CLIENT> <clusterShare>\Temp\winrm-upload-<CLIENT>
Unique output file names SEN_<CLIENT>_<time>_<random> winrm-<CLIENT>-<time>-<random>

Since 2.0.0 no SMB share is created — files travel through the WinRM channel itself and land in a plain directory — so the old name was misleading and the trailing $ (the Windows hidden-share convention) was meaningless.

Why winrm-upload- and not winrm-java-upload-

The prefix is deliberately kept at 13 characters (the exact length of SEN_ShareFor_):

  • the MAX_PATH budget for the complete staging path (with a maximal 64-character client computer name) is unchanged — see ShellFileCopy.maxRemoteNameLength and its test;
  • in the legacy WindowsTempShare.getOrCreateShare() SMB flow (still public API, where buildShareName() is also the share name), the name stays under the 80-character share-name limit, which winrm-java-upload- would exceed for maximal computer names.

Compatibility

  • Directories left behind by earlier versions are neither reused nor cleaned up by the 30-day purge; they can simply be deleted (documented in file-transfers.md).
  • Hosts hardened with per-directory ACLs must grant write access on the new path (preparing-the-host.md updated).

Verification

mvn verify site passes: 186 unit tests + 1 IT, 0 failures; checkstyle/PMD/SpotBugs clean; mvn formatter:format reports no changes.

🤖 Generated with Claude Code

The SEN_ShareFor_<host>$ name (and its SEN_TempFor_/SEN_ cousins) was
inherited from the ancient pre-2.0.0 SMB-share implementation; since no
share is created anymore, the trailing $ (hidden-share convention) was
meaningless for a plain directory. The winrm-upload- prefix is kept as
short as SEN_ShareFor_ so the MAX_PATH staging budget is unchanged and
the legacy SMB share name stays under the 80-character limit.

Closes #150

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7150a6a04

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

*/
static String buildShareName() {
return String.format("SEN_ShareFor_%s$", Utils.getComputerName());
return String.format("winrm-upload-%s", Utils.getComputerName());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Document the public share-name change in README

For consumers of the public WindowsTempShare.getOrCreateShare(...) API, this changes both the created SMB share/returned UNC name and its visibility by dropping the trailing $; however, README.md was not updated, and the migration guide still promises that WindowsTempShare is unchanged. Add an upgrade notice explaining this compatibility change and the new visible share name, as required for end-user-facing changes.

AGENTS.md reference: AGENTS.md:L25-L27

Useful? React with 👍 / 👎.

…pgrade notes

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bertysentry

Copy link
Copy Markdown
Contributor Author

@codex please review again

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: af37939903

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@bertysentry
bertysentry merged commit 50018eb into main Jul 29, 2026
5 checks passed
@bertysentry
bertysentry deleted the rename-upload-directory branch July 29, 2026 17:25
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.

Rename the remote transfer directory from SEN_ShareFor_<host>$ to winrm-upload-<host>

1 participant