Skip to content

Use mtime-based files cache default on Windows#9530

Open
hiijoshi wants to merge 2 commits intoborgbackup:masterfrom
hiijoshi:fix-windows-files-cache
Open

Use mtime-based files cache default on Windows#9530
hiijoshi wants to merge 2 commits intoborgbackup:masterfrom
hiijoshi:fix-windows-files-cache

Conversation

@hiijoshi
Copy link

@hiijoshi hiijoshi commented Mar 22, 2026

Summary

Fix default files-cache mode on Windows.

On Windows, ctime represents file creation time rather than inode change time. Using ctime in the default files-cache mode can therefore fail to detect modified files correctly.

Changes

  • Use an mtime-based files cache mode on Windows
  • Keep existing ctime,size,inode default behavior unchanged on POSIX systems

Reasoning

This aligns with the issue discussion and ensures more reliable change detection on Windows systems.

Testing

  • Verified code compiles and integrates with existing logic
  • No changes to non-Windows behavior

Additional Improvement

Also added a warning when using ctime-based files cache mode on Windows, since ctime represents file creation time and may not detect file changes correctly.

Fixes #7193

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.

borg2: --files-cache=ctime,inode,size (windows)

1 participant