From daec4bc6a2a9f9e038e5269586b06018ff327a27 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Wed, 14 Oct 2026 11:17:38 +0200 Subject: fix(node): index, serve and write files past Windows' MAX_PATH With the system's default setting (LongPathsEnabled off) every call given a plain path of 260 characters or more refuses it, so a deep library was partly invisible: the walk could not list such a directory and its files never reached the members. The node now hands each call that touches a group's disk the extended form (paths.long_path), and keeps the plain path in the index, the hash cache and the log. A directory is listed under its long form and its entries named from the plain one (indexer.walk_files, wire._walk_dirs). Covered: the walk, stats and hashing, reconcile and the watcher, the folder list members see, serving over WebRTC and QUIC, deletion, uploads and their recovery, folder creation and removal, audio tags and the cover beside a track, photos, and a show's episode numbering. ffmpeg extends a long path itself and keeps the plain one. long_path now normalises before prefixing (the extended form skips the system's normalisation) and starts at 248 characters, where creating a directory is already refused. test_long_paths.py runs with the setting off: 15 of its 17 tests fail without the change. Checked by hand in the installed app with files at 312 to 380 characters. Co-Authored-By: Claude Opus 5.5 --- docs/WINDOWS-PORT.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'docs/WINDOWS-PORT.md') diff --git a/docs/WINDOWS-PORT.md b/docs/WINDOWS-PORT.md index 840f22a..cd0c89b 100644 --- a/docs/WINDOWS-PORT.md +++ b/docs/WINDOWS-PORT.md @@ -729,8 +729,14 @@ real bug found while testing W4, not from the original plan. verify `safeStorage`/DPAPI works, verify Task Scheduler autostart. - **Electron:** visual check of the UI, native save dialog, node management panel (once W3 is done). -- **Long paths:** a library with a path exceeding 260 characters on NTFS - with long paths enabled. +- **Long paths:** done for the node (2026-10-14), with `LongPathsEnabled` + off, the default: `test_long_paths.py` indexes, serves, deletes, uploads + into, lists and enriches files whose path is past 260 characters, and + fails without the change. Before it, the walk could not list such a + directory and its files never reached the members. Checked by hand in the + installed app the same day, files at 312 and 380 characters: indexed, + listed, streamed, downloaded byte for byte, uploaded into, deleted; tags, + the cover beside the track and the video and photo thumbnails all there. - **Case collisions:** a group indexed on ext4 containing `Film.mkv` and `film.mkv`, opened from a Windows client. -- cgit v1.2.3