Windows: scanner silently drops files whose full path is 260 characters or longer

オープン
#1,719 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
perl
領域
backend, databases

調査の方向性

Start with Local/Async.pm and trace how file_filter handles a failed stat, then inspect the scanner logging configuration for the 9.1 and 9.2 behavior described here. Reproduce or test a scan with a path at the 260-character cutoff; done means skipped files are logged at ERROR and the scan reports a count, including when rescanning.

索引モデルが issue の本文から書いたものです。

説明

On Windows, the scanner silently skips any file whose full path is 260 characters or longer. In my library that is 112 of 5218 .opus files. The scan reports no errors, and LongPathsEnabled=1 makes no difference. The cutoff is exact: the longest indexed path is 259 characters, and the shortest missing path is 260 (leaving out files that also hit #1305).

Why it is silent: from reading the source, not stepped through on Windows. readdir returns the name, but stat fails. The file_filter in Local/Async.pm then falls through to folderFilter, which checks the parent directory and passes. The file gets a scanned_files row with size 0, and rescan only processes rows with filesize != 0. library.db matches this: every missing file has a size 0 row.

In 9.2: the failed stat is caught, but logged at WARN. scan.scanner defaults to ERROR, so it is still invisible by default.

Proposal: log these at ERROR with a per-scan count of skipped files, and backport that to 9.1. It would also report the ? names from #1305. Full long path support is a much bigger job: Perl's own Windows file calls have this limit (win32_stat, and PerlDir_mapA in win32/vdir.h), still do in blead, and tag reading, playback, artwork and transcoders all open files by path too.

Workaround: shorten the path, for example with a share rooted closer to the music.

LMS 9.1.1, Perl 5.32.1 x64, code page 1252, media folder on a UNC share.

主要言語
Perl
スター
1.8k
フォーク
389
平均マージ
1日 4時間
マージ済み PR(30日)
10

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

LMS-Community/slimserver のほかの issue

LMS-Community/slimserver の issue をすべて見る

似ている issue

Perl の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。