[Windows] Local recycle-bin removal fails for physical sync entries with long paths (LongPathsEnabled=0)

Abierto
#12,690 0 comentarios 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
cpp
Área
backend, desktop

Línea de trabajo

Start by tracing OCC::PropagateLocalRemove and the Windows recycle-bin and FileSystem::isFileLocked paths mentioned in the logs. The report points to physical sync mode, NTFS paths longer than 260 characters, and LongPathsEnabled=0, but lacks a clean-room reproducer. Build a synthetic test with fake paths and known lengths; done when the failure is reproduced or ruled out and the client reports an actionable error without silently deleting files.

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

Descripción

Pre-submission Checks
  • Searched open and closed issues for recycle-bin failures and long paths. #10264 and #10677 concern long-path warnings, primarily VFS/setup; I could not find an exact match for the physical-mode removal case below.
  • Provided the observed sequence, environment, anonymized excerpts and investigation limits.
Describe the bug

With a full physical synchronization relationship (virtualFilesMode=off), the Windows client repeatedly failed to retire stale local files/directories after they became absent at their old remote locations. The entries remained in BlacklistedError with a generic "could not move to recycle bin" message and increasing retry delays.

For three directories, an isFileLocked warning immediately preceded the removal failure: WindowsError: 57: El parámetro no es correcto. This is the preceding lock-probe diagnostic, not a confirmed native recycle-bin return code. The displayed number is retained without assuming decimal or hexadecimal formatting.

Expected behavior

Safely retire local entries or explain the specific limitation that prevents it. If long paths require a Windows opt-in or are unsupported by the recycle-bin implementation, provide an actionable diagnostic before repeated generic retries. A permanent-delete fallback would not be an acceptable silent workaround.

Observed sequence and reproducibility limits
  1. An existing client synchronized a project space to a local NTFS directory in physical mode. The directory was also exported over SMB.
  2. Some entries became absent at their original remote locations. Authenticated DAV checks confirmed HTTP 404 there; several directory identities were additionally found in the server's trash.
  3. The client planned local REMOVE operations, but local recycle-bin removal failed repeatedly.
  4. The client continued processing other entries; the affected relationship completed with SyncResult::Problem.

This describes an operational observation, not a clean-room reproducer. No new create/delete test was run in production. An isolated synthetic reproduction is still needed. Whether the original remote removal was a delete or part of a move workflow was not established for every entry.

Logs

Anonymized excerpts from affected entries and subsequent cycles; timestamps, paths and object addresses are placeholders:

[t0] [warning sync.filesystem] ... FileSystem::isFileLocked(...) "WindowsError: 57: El parámetro no es correcto."
[t0] [warning sync.propagator] Could not complete propagation of "<RELATIVE_PATH>" by OCC::PropagateLocalRemove(...) with status OCC::SyncFileItem::BlacklistedError and error: "Konnte '<SYNC_ROOT>/<RELATIVE_PATH>' nicht in den Papierkorb berschieben"
[t0] [warning sync.propagator] ... OCC::PropagateDirectory(...) ... BlacklistedError ...
[t1] [info gui.scheduler.syncscheduler] Sync finished for "<SYNC_ROOT>/" with status OCC::SyncResult::Problem
[t2, after local reconciliation] [info gui.scheduler.syncscheduler] Sync finished for "<SYNC_ROOT>/" with status OCC::SyncResult::Success
Client version number
  • ownCloud 7.1.1.19543, revision 9525d7.
  • Qt 6.8.3; OpenSSL 3.4.5.
  • Windows Server 2019 Standard, OS build 17763, x86_64.
  • The application has the wincfapi connector available, but the affected relationship uses virtualFilesMode=off.
Storage and Windows configuration
  • Local NTFS volume; this was not a mapped network drive from the client's perspective.
  • Other users can access the directory through an SMB share.
  • LongPathsEnabled=0 was read during the investigation; it was not changed.
  • No SMB handles were open on the affected paths when they were inspected. This does not establish whether handles existed when the failures first occurred.
  • Exact installation and document paths are intentionally omitted.
Server information

Infinite Scale 8.2.2, Docker on Linux ARM64. A separate local search-service mitigation was already present; this is not claimed as an untouched deployment. No causal link between that mitigation and the Windows filesystem failure has been established.

Additional findings and local mitigation
  • Six affected entries contained actual local paths with maximum lengths of 313, 264, 275, 261, 263 and 265 characters. Several directory roots themselves were shorter than 260 characters.
  • Their files were readable ordinary NTFS files, without offline/reparse flags.
  • After verifying the old remote paths were absent, content was copied outside synchronization, checked with SHA-256, and the stale local entries were atomically moved to quarantine on the same volume. Backup/quarantine hashes matched.
  • The original client process stayed running. No account/journal reset, ignore-rule change, VFS-mode change, permission change or server restart was performed for that reconciliation.
  • Subsequent cycles completed with SyncResult::Success. A later different directory exhibited the same generic recycle-bin failure, so reconciliation is a local workaround, not a demonstrated global fix.
  • Long paths are a consistent risk pattern, not a proven sole cause. No causal relationship to placeholder-creation failures or search-index errors is claimed.

Could you advise whether physical-mode removal is expected to handle this configuration, and whether the recycle-bin/lock-check paths can provide a more specific error? A synthetic test with fake names and known path lengths could help distinguish long-path handling from other Windows filesystem conditions.

No original logs, screenshots, organization identifiers, document names, real paths, resource IDs, server addresses or credentials are included.

Lenguaje dominante
C++
Estrellas
1.5k
Forks
695
Merge medio
8 d 7 h
PR fusionados (30 d)
6

Preparar el entorno

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 owncloud/client

Todos los issues de owncloud/client

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.