Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the FileChangedInfo structure to use std::optional<time_t> instead of time_t for the mtime field, eliminating the need to use the sentinel value -1 to indicate non-existent files. The change improves type safety by making the absence of a modification time explicit through the type system.
- Changed
mtimefromtime_ttostd::optional<time_t>inFileChangedInfo - Added validation check in
fromSyncJournalFileRecordto return empty info for invalid records - Updated
fileChangedfunction to usehas_value()instead of comparing against-1
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/libsync/filesystem.h | Changed mtime field type to std::optional<time_t> |
| src/libsync/filesystem.cpp | Updated logic to check for valid records and use optional semantics instead of sentinel values |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
a2332e6 to
5b36ec1
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.