Skip to content

Flush buffered input in file::move#207

Merged
bugdea1er merged 1 commit into
mainfrom
file-move
May 4, 2025
Merged

Flush buffered input in file::move#207
bugdea1er merged 1 commit into
mainfrom
file-move

Conversation

@bugdea1er
Copy link
Copy Markdown
Owner

@bugdea1er bugdea1er commented May 4, 2025

Add a flush call at the beginning of file::move

@bugdea1er bugdea1er requested a review from Copilot May 4, 2025 14:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request ensures that files have their buffered input flushed before moving to a new location, reducing the risk of data loss. Key changes include:

  • Removal of an explicit flush in the test, as the flushing is now handled within file::move.
  • Addition of a flush call at the beginning of file::move.
  • Minor comment update to explain the rationale behind using a copy rather than a hard link.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
tests/file.cpp Removed redundant flush call in the test after shifting flush logic.
src/file.cpp Added flush call at the beginning of file::move to ensure data is written before moving.
Files not reviewed (1)
  • include/tmp/file: Language not supported

@bugdea1er bugdea1er marked this pull request as ready for review May 4, 2025 14:30
@bugdea1er bugdea1er merged commit f197a23 into main May 4, 2025
16 checks passed
@bugdea1er bugdea1er deleted the file-move branch May 4, 2025 14:31
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.

2 participants