{{ message }}
fix: Handle Windows line endings in rclone bisync - #422
Merged
Conversation
Fixes issue where rclone bisync treats LF→CRLF line ending conversions as file corruption due to size differences. By comparing only modification times instead of size+modtime, we allow Windows to use CRLF endings without triggering false corruption warnings. This resolves the customer-reported issue where editing files in the cloud web interface on Windows causes bisync to fail with "sizes differ" errors. The 469-byte difference reported was exactly the number of line breaks in the file, confirming the LF (1 byte) to CRLF (2 bytes) conversion issue. Related: Windows text file line ending handling Signed-off-by: phernandez <paul@basicmachines.co>
Contributor
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.

Summary
Fixes rclone bisync failures on Windows caused by line ending conversions (LF→CRLF).
Problem
Customer reported bisync failing with "corrupted on transfer: sizes differ src 5163 vs dst 5632" error. The 469-byte difference exactly matches the number of line breaks in the file, indicating LF (1 byte) to CRLF (2 bytes) conversion on Windows.
Solution
Added
--compare=modtimeflag to rclone bisync command. This makes bisync compare only modification times instead of size+modtime, preventing line ending conversions from being treated as file corruption.Changes
src/basic_memory/cli/commands/cloud/rclone_commands.py:205--compare=modtimeflag to bisync commandTesting
--resynconce after updating to establish new baselineCustomer Impact
Resolves the reported issue where editing files in the cloud web interface on Windows causes bisync to fail. The fix allows Windows to use CRLF endings without triggering false corruption warnings.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com