Skip to content

fix(cfapi): 0x80070781 on New File — ConvertToPlaceholder error not guarded before SetSyncState #152

Description

@CCoupel

Symptôme

0x80070781 (ERROR_INVALID_REPARSE_DATA) sur "Nouveau fichier" dans l'Explorateur Windows après une synchronisation.

Root cause

Commit bfada8e (#151) ajoutait ConvertToPlaceholder avant SetSyncState dans ActionDownload/ActionCopy, mais ignorait silencieusement l'erreur (_ = pm.ConvertToPlaceholder(...)). Si la conversion échouait, SetSyncState était quand même appelé sur un non-placeholder, écrivant des données de reparse point CF invalides → 0x80070781 sur les opérations suivantes.

Fix

internal/sync/dispatcher.goplaceholderOK guard :

  • Si ConvertToPlaceholder retourne une erreur, émettre sync:warn et sauter SetSyncState entièrement.
  • SetSyncState sur un non-placeholder est la source de la corruption CF — l'ignorer n'est pas sûr.

Tests

TestDispatcher_ActionDownload_ConvertBeforeSetSync, TestDispatcher_ActionCopy_ConvertBeforeSetSync

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendCode Go / moteur de synchronisationbugSomething isn't workingwindows-apiCloud Filter API, WinFsp, placeholders

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions