Skip to content

Commit 7280966

Browse files
committed
fix(checkpoints): correct Windows Thumbs cache pattern (Thumbs.db) and add unit test (#7228)
1 parent 8ca0c46 commit 7280966

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/services/checkpoints/__tests__/excludes.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,16 @@ readme.md text
159159
expect(excludePatterns).toContain("*.shp") // geospatial
160160
expect(excludePatterns).toContain("*.log") // log
161161
})
162+
it("should include Windows Thumbs.db cache pattern", async () => {
163+
// Mock .gitattributes file doesn't exist
164+
vi.mocked(fileExistsAtPath).mockResolvedValue(false)
165+
166+
// Get exclude patterns
167+
const excludePatterns = await getExcludePatterns(testWorkspacePath)
168+
169+
// Verify Windows cache file pattern is included
170+
expect(excludePatterns).toContain("Thumbs.db")
171+
})
162172
})
163173

164174
describe("getLargeFileAutoExcludePatterns with LFS pre-filtering", () => {

src/services/checkpoints/excludes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const getCacheFilePatterns = () => [
150150
"*.swp",
151151
"*.temp",
152152
"*.tmp",
153-
"*.Thumbs.db",
153+
"Thumbs.db",
154154
]
155155

156156
const getConfigFilePatterns = () => ["*.env*", "*.local", "*.development", "*.production"]

0 commit comments

Comments
 (0)