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

Abierto
#1,719 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
perl

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Perl
Estrellas
1.8k
Forks
389
Merge medio
1 d 4 h
PR fusionados (30 d)
10

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de LMS-Community/slimserver

Todos los issues de LMS-Community/slimserver

Issues similares

Más issues de Perl

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.