Depending of the generated hash used for storing cache on disk, an error may occur .
Error Domain=NSCocoaErrorDomain Code=4 "The file “wba57NyfgQqd1OIToLN0OA+c0=” doesn’t exist." UserInfo={NSFilePath=/Users/xxxxxxxx/Library/Caches/IBLinter/0.4.22/7/wba57NyfgQqd1OIToLN0OA+c0=, NSUnderlyingError=0x1069e3020 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
Program ended with exit code: 0
In the example above, the generated base64 hash is "7/wba57NyfgQqd1OIToLN0OA+c0=", it contains "/" character (which is a valid base 64 encoding character). But it breaks the LintDiskCache.save() when trying to execute "contentData.write(to: cacheFilePath)".
As a workaround i rewrote these lines on LintDiskCache.new() and LintDiskCache.load() :
let hashKey = Data(configContent.sha1()).base64EncodedString()
to
let hashKey = Data(configContent.sha1()).base64EncodedString().replacingOccurrences(of: "/", with: "_")
Depending of the generated hash used for storing cache on disk, an error may occur .
Error Domain=NSCocoaErrorDomain Code=4 "The file “wba57NyfgQqd1OIToLN0OA+c0=” doesn’t exist." UserInfo={NSFilePath=/Users/xxxxxxxx/Library/Caches/IBLinter/0.4.22/7/wba57NyfgQqd1OIToLN0OA+c0=, NSUnderlyingError=0x1069e3020 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} Program ended with exit code: 0
In the example above, the generated base64 hash is "7/wba57NyfgQqd1OIToLN0OA+c0=", it contains "/" character (which is a valid base 64 encoding character). But it breaks the LintDiskCache.save() when trying to execute "contentData.write(to: cacheFilePath)".
As a workaround i rewrote these lines on LintDiskCache.new() and LintDiskCache.load() :
let hashKey = Data(configContent.sha1()).base64EncodedString() to let hashKey = Data(configContent.sha1()).base64EncodedString().replacingOccurrences(of: "/", with: "_")