From 72809666ca4ee5afe60bf8fb9a518eac863d1aca Mon Sep 17 00:00:00 2001 From: hannesrudolph Date: Tue, 19 Aug 2025 17:28:54 -0600 Subject: [PATCH] fix(checkpoints): correct Windows Thumbs cache pattern (Thumbs.db) and add unit test (#7228) --- src/services/checkpoints/__tests__/excludes.spec.ts | 10 ++++++++++ src/services/checkpoints/excludes.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/services/checkpoints/__tests__/excludes.spec.ts b/src/services/checkpoints/__tests__/excludes.spec.ts index acb1c13d40..3a41c346ef 100644 --- a/src/services/checkpoints/__tests__/excludes.spec.ts +++ b/src/services/checkpoints/__tests__/excludes.spec.ts @@ -159,6 +159,16 @@ readme.md text expect(excludePatterns).toContain("*.shp") // geospatial expect(excludePatterns).toContain("*.log") // log }) + it("should include Windows Thumbs.db cache pattern", async () => { + // Mock .gitattributes file doesn't exist + vi.mocked(fileExistsAtPath).mockResolvedValue(false) + + // Get exclude patterns + const excludePatterns = await getExcludePatterns(testWorkspacePath) + + // Verify Windows cache file pattern is included + expect(excludePatterns).toContain("Thumbs.db") + }) }) describe("getLargeFileAutoExcludePatterns with LFS pre-filtering", () => { diff --git a/src/services/checkpoints/excludes.ts b/src/services/checkpoints/excludes.ts index 800866f94f..0867073e40 100644 --- a/src/services/checkpoints/excludes.ts +++ b/src/services/checkpoints/excludes.ts @@ -150,7 +150,7 @@ const getCacheFilePatterns = () => [ "*.swp", "*.temp", "*.tmp", - "*.Thumbs.db", + "Thumbs.db", ] const getConfigFilePatterns = () => ["*.env*", "*.local", "*.development", "*.production"]