diff --git a/Library/MapleBacon/MapleBacon/Storage/DiskStorage.swift b/Library/MapleBacon/MapleBacon/Storage/DiskStorage.swift index 3ddd08a..43cc59b 100644 --- a/Library/MapleBacon/MapleBacon/Storage/DiskStorage.swift +++ b/Library/MapleBacon/MapleBacon/Storage/DiskStorage.swift @@ -40,7 +40,8 @@ extension DiskStorage: Storage { } public func image(forKey key: String) -> UIImage? { - guard let data = try? Data(contentsOf: URL(fileURLWithPath: defaultStoragePath(forKey: key))) else { return nil } + let path = defaultStoragePath(forKey: key) + guard let data = try? Data(contentsOf: URL(fileURLWithPath: path)) else { return nil } return UIImage.imageWithCachedData(data) } @@ -71,6 +72,7 @@ extension DiskStorage: Storage { } fileprivate func defaultStoragePath(forKey key: String) -> String { + let key = key.components(separatedBy: .punctuationCharacters).joined() return (storagePath as NSString).appendingPathComponent(key) } diff --git a/MapleBacon.podspec b/MapleBacon.podspec index f98eac3..87547ac 100644 --- a/MapleBacon.podspec +++ b/MapleBacon.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MapleBacon" - s.version = "3.0.0" + s.version = "3.0.1" s.summary = "A delicious image download and caching library for iOS" s.description = <<-DESC A delicious image download and caching library for iOS. Background downloads, caching and scaling. diff --git a/MapleBacon.xcodeproj/xcshareddata/xcschemes/MapleBacon.xcscheme b/MapleBacon.xcodeproj/xcshareddata/xcschemes/MapleBacon.xcscheme index 72f0a47..10bd755 100644 --- a/MapleBacon.xcodeproj/xcshareddata/xcschemes/MapleBacon.xcscheme +++ b/MapleBacon.xcodeproj/xcshareddata/xcschemes/MapleBacon.xcscheme @@ -69,7 +69,7 @@ BlueprintIdentifier = "F2AB726D1A40395200CCE62B" BuildableName = "MapleBaconExample.app" BlueprintName = "MapleBaconExample" - ReferencedContainer = "container:../../MapleBaconExample/MapleBaconExample.xcodeproj"> + ReferencedContainer = "container:MapleBaconExample/MapleBaconExample.xcodeproj"> @@ -92,7 +92,7 @@ BlueprintIdentifier = "F2AB726D1A40395200CCE62B" BuildableName = "MapleBaconExample.app" BlueprintName = "MapleBaconExample" - ReferencedContainer = "container:../../MapleBaconExample/MapleBaconExample.xcodeproj"> + ReferencedContainer = "container:MapleBaconExample/MapleBaconExample.xcodeproj">