Skip to content

Cfapi::updatePlaceholderState only update meta data if file is virtual - #1103

Merged
TheOneRing merged 1 commit into
mainfrom
work/meta
Sep 15, 2026
Merged

TheOneRing merged 1 commit into
mainfrom
work/meta

Conversation

@TheOneRing

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Replacement handling can update the old destination instead of the newly converted placeholder.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This pull request updates CFAPI placeholder metadata handling based on whether files are hydrated or virtual.

Changes:

  • Propagates hydration state through the CFAPI wrapper.
  • Skips metadata updates for hydrated files.
  • Updates placeholder handles during conversion.
File summaries
File Summary
src/plugins/vfs/cfapi/vfs_cfapi.cpp Passes hydration state based on item type.
src/plugins/vfs/cfapi/cfapiwrapper.h Updates the placeholder API signature.
src/plugins/vfs/cfapi/cfapiwrapper.cpp Conditionally applies metadata and placeholder updates.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/plugins/vfs/cfapi/cfapiwrapper.cpp Outdated
}
return updatePlaceholderState(path, modtime, size, fileId, replacesPath);
// we are converting an existing file, so it must be hydrated
return updatePlaceholderState(path, modtime, size, fileId, replacesPath, true);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get why this isHydrated is always true. The file object was just converted to placeholder which is not hydrated?

@TheOneRing
TheOneRing merged commit 2ee8ffc into main Sep 15, 2026
5 of 27 checks passed
@TheOneRing
TheOneRing deleted the work/meta branch September 15, 2026 20:07
@TheOneRing TheOneRing linked an issue Sep 16, 2026 that may be closed by this pull request
13 tasks
@TheOneRing TheOneRing mentioned this pull request Sep 16, 2026
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Data Corruption] Files truncated or padded with 0x00 bytes when saving in VS Code (Windows VFS) Wait period until sync of file

3 participants