From 7e0bb56361f920574687ea5a82a68be35c9d98a8 Mon Sep 17 00:00:00 2001 From: Edwin Vermeer Date: Tue, 28 Aug 2018 06:52:33 +0200 Subject: [PATCH] storagePath variable scope bug --- EVURLCache.podspec | 2 +- EVURLCache/Pod/EVURLCache.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EVURLCache.podspec b/EVURLCache.podspec index 9de4b79..00992d1 100755 --- a/EVURLCache.podspec +++ b/EVURLCache.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| # s.name = "EVURLCache" -s.version = "3.5.0" +s.version = "3.6.0" s.summary = "NSURLCache subclass for handeling all web requests that use NSURLRequest" s.description = "This is a NSURLCache subclass for handeling all web requests that use NSURLRequest. (This includes UIWebView)" s.homepage = "https://github.com/evermeer/EVURLCache" diff --git a/EVURLCache/Pod/EVURLCache.swift b/EVURLCache/Pod/EVURLCache.swift index 615c987..96e1e7c 100755 --- a/EVURLCache/Pod/EVURLCache.swift +++ b/EVURLCache/Pod/EVURLCache.swift @@ -120,10 +120,10 @@ open class EVURLCache: URLCache { } // Check if there is a cache for this request - let storagePath = EVURLCache.storagePathForRequest(request, rootPath: EVURLCache._cacheDirectory) ?? "" + var storagePath = EVURLCache.storagePathForRequest(request, rootPath: EVURLCache._cacheDirectory) ?? "" if !FileManager.default.fileExists(atPath: storagePath) { EVURLCache.debugLog("CACHE not found \(storagePath)") - let storagePath = EVURLCache.storagePathForRequest(request, rootPath: EVURLCache._preCacheDirectory) ?? "" + storagePath = EVURLCache.storagePathForRequest(request, rootPath: EVURLCache._preCacheDirectory) ?? "" if !FileManager.default.fileExists(atPath: storagePath) { EVURLCache.debugLog("PRECACHE not found \(storagePath)") return nil