diff --git a/TagTunes/Artwork.swift b/TagTunes/Artwork.swift index de18c9e..3997c4d 100644 --- a/TagTunes/Artwork.swift +++ b/TagTunes/Artwork.swift @@ -54,6 +54,10 @@ public class Artwork: iTunesType { public func saveToURL(url: NSURL, filename: String) throws { let directory = url.filePathURL!.path! let filePath = directory.stringByAppendingString("/\(filename).tiff") + + if !Preferences.sharedPreferences.overwriteExistingFiles && NSFileManager.defaultManager().fileExistsAtPath(filePath) { + return + } try NSFileManager.defaultManager().createDirectoryAtPath(directory, withIntermediateDirectories: true, attributes: nil) let _ = NSFileManager.defaultManager().createFileAtPath(filePath, contents: saveImage?.TIFFRepresentation, attributes: nil) diff --git a/TagTunes/Base.lproj/Main.storyboard b/TagTunes/Base.lproj/Main.storyboard index 0a0f4b0..418d33a 100644 --- a/TagTunes/Base.lproj/Main.storyboard +++ b/TagTunes/Base.lproj/Main.storyboard @@ -760,11 +760,11 @@ CA - + + + + + + + + + + + + Choose an artwork directory… + + + + +