Three warnings go quiet — a weak binding turns let, the typed catch drops its dead generic twin, and a trash receipt is discarded on purpose
Claude-Session: https://claude.ai/code/session_014PtZdPwqZuqEDLc6wZMtEy
This commit is contained in:
@@ -516,7 +516,7 @@ struct ShareBoardCommand: View {
|
||||
Task { @MainActor in
|
||||
// Weak: the window this share was invoked from must not be kept alive by this task
|
||||
// across the flush's `await` just so the picker can anchor to it later.
|
||||
weak var invokedWindow = NSApp.keyWindow ?? NSApp.mainWindow
|
||||
weak let invokedWindow = NSApp.keyWindow ?? NSApp.mainWindow
|
||||
|
||||
let cancellation = BoardCopyCancellation<BoardShareStager.StagedArchive>()
|
||||
let operation = store.banners.beginOperation(
|
||||
|
||||
@@ -206,17 +206,14 @@ enum BoardShareStager {
|
||||
|
||||
do {
|
||||
try DittoZipArchiver.zip(contentsOf: treeCopy, to: zipURL)
|
||||
} catch let zipFailure as DittoZipArchiver.Failure {
|
||||
} catch {
|
||||
try? FileManager.default.removeItem(at: root)
|
||||
switch zipFailure {
|
||||
switch error {
|
||||
case let .launchFailed(message):
|
||||
throw failure(at: treeCopy, "could not start the archiver: \(message)")
|
||||
case let .nonZeroExit(status, message):
|
||||
throw failure(at: treeCopy, "the archiver exited with status \(status): \(message)")
|
||||
}
|
||||
} catch {
|
||||
try? FileManager.default.removeItem(at: root)
|
||||
throw failure(at: treeCopy, "could not create the zip: \(error.localizedDescription)")
|
||||
}
|
||||
|
||||
// The zip is what the picker shares; the decompressed tree underneath it was only ever a
|
||||
|
||||
@@ -2371,7 +2371,7 @@ public final class BoardStore: HealHost {
|
||||
guard let priorImage, priorImage != newReference,
|
||||
let bareName = BoardBackdrop.qualifiedBareName(of: priorImage)
|
||||
else { return }
|
||||
try? BoardWriter.trashBoardImage(
|
||||
_ = try? BoardWriter.trashBoardImage(
|
||||
named: bareName, inFolder: backgroundsFolder, healMarked: false,
|
||||
operation: .tidyBackgroundImage(filename: bareName)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user