diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-28 22:25:07 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-28 22:25:07 +0200 |
| commit | 7cec0e9199753e11b95500da14d3fd89835e1aa3 (patch) | |
| tree | c134f460c9dba281db2fe32712766cf9524ca9da /packages/meshbay-common/src/meshbay_common/paths.py | |
| parent | f04b4e0c4350a5acc539a8f15bc9df4bfd10a537 (diff) | |
| download | meshbay-7cec0e9199753e11b95500da14d3fd89835e1aa3.tar.gz | |
feat(client): save files under a name every platform can write
A node serves the name its disk gave a file; the client now makes it
portable at save time (single file, zip entries, zip name) and says so
on the transfer row. Same rule as paths.sanitize_for_download, held by a
parity test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-common/src/meshbay_common/paths.py')
| -rw-r--r-- | packages/meshbay-common/src/meshbay_common/paths.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/paths.py b/packages/meshbay-common/src/meshbay_common/paths.py index 45bf34e..b673649 100644 --- a/packages/meshbay-common/src/meshbay_common/paths.py +++ b/packages/meshbay-common/src/meshbay_common/paths.py @@ -137,7 +137,9 @@ def sanitize_for_download(name: str, *, replacement: str = "_") -> str: For the client saving a file, never for the node storing one. Returns the name unchanged when it is already portable, so the common case is identity - and the caller can tell whether it renamed anything by comparing. + and the caller can tell whether it renamed anything by comparing. The + browser's copy is `static/portable-name.js`, held to this one by + `test_portable_name_parity.py`. """ if is_portable_name(name): return name |