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

Aperta
#12,690 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
backend, desktop

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C++
Stelle
1.5k
Fork
695
Merge medio
8g 7h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di owncloud/client

Tutte le issue di owncloud/client

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.