Repository navigation
Cfapi: Prevent move of dehydrated placeholder to ignored location - #454
Merged
Merged
Conversation
Open
Open
TheOneRing
marked this pull request as ready for review
August 6, 2025 14:10
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the CloudFiles API (CFAPI) implementation to prevent moves of dehydrated placeholders to ignored locations. The changes centralize callback context information into a single structure and add logic to reject problematic file moves.
Key changes:
- Introduces
CallBackContextstructure to encapsulate callback parameters - Replaces string-based request IDs with numeric IDs throughout the hydration workflow
- Adds rename handling to prevent moves of dehydrated placeholders to ignored directories
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vfs_cfapi.h | Updates method signatures to use CallBackContext and int64_t request IDs |
| vfs_cfapi.cpp | Refactors hydration methods to work with new context structure |
| hydrationjob.h | Changes constructor and removes setter methods for context data |
| hydrationjob.cpp | Updates implementation to use embedded context instead of separate fields |
| cfapiwrapper.h | Defines new CallBackContext structure and debug operator |
| cfapiwrapper.cpp | Implements context-based callbacks and adds rename rejection logic |
| filesystem.cpp | Adds assertion for file existence validation |
| const auto result = _journal->setFileRecord(SyncJournalFileRecord::fromSyncFileItem(*item)); | ||
| if (!result) { | ||
| qCWarning(lcHydration) << "Error when setting the file record to the database" << _localFilePathAbs << result.error(); | ||
| if (QFileInfo::exists(localFilePathAbs())) { |
There was a problem hiding this comment.
Using QFileInfo::exists() as a static method is deprecated. Use QFileInfo(path).exists() instead.
Suggested change
| if (QFileInfo::exists(localFilePathAbs())) { | |
| if (QFileInfo(localFilePathAbs()).exists()) { |
TheOneRing
force-pushed
the
work/move
branch
3 times, most recently
from
August 7, 2025 14:33
c42fe2a to
bc74953
Compare
This fixes an assert for an empty inode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.