Deletes temporary image file after changing artwork
This commit is contained in:
parent
98ed657f8a
commit
1bfe030dd9
@ -559,6 +559,13 @@ private extension GameCollectionViewController
|
|||||||
|
|
||||||
func changeArtwork(for game: Game, toImageAt url: URL?, errors: [Error])
|
func changeArtwork(for game: Game, toImageAt url: URL?, errors: [Error])
|
||||||
{
|
{
|
||||||
|
defer {
|
||||||
|
if let temporaryImageURL = url
|
||||||
|
{
|
||||||
|
try? FileManager.default.removeItem(at: temporaryImageURL)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var errors = errors
|
var errors = errors
|
||||||
|
|
||||||
var imageURL: URL?
|
var imageURL: URL?
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user