Skip to content

Commit

Permalink
[7820] Attempt to fix potential issue with tab screenshots not being …
Browse files Browse the repository at this point in the history
…cleaned up properly. Needs some additional investigation. (#17438)

(cherry picked from commit 385859f)
  • Loading branch information
mattreaganmozilla authored and mergify[bot] committed Nov 22, 2023
1 parent 23869f9 commit 098d713
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Storage/DiskImageStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ public actor DefaultDiskImageStore: DiskImageStore {
}

public func clearAllScreenshotsExcluding(_ keys: Set<String>) async throws {
let keysToDelete = keys.subtracting(keys)
let keysToDelete = self.keys.subtracting(keys)

for key in keysToDelete {
let url = URL(fileURLWithPath: filesDir).appendingPathComponent(key)
try FileManager.default.removeItem(at: url)
}
self.keys = keys.intersection(keys)
self.keys = keys
}

public func deleteImageForKey(_ key: String) async {
Expand Down

0 comments on commit 098d713

Please sign in to comment.