From 60727bffa53ebfbfaf701575904847827bc1656a Mon Sep 17 00:00:00 2001 From: Kornel Date: Mon, 24 Apr 2017 18:03:21 +0100 Subject: [PATCH] Log key read failure --- Sparkle/SUHost.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Sparkle/SUHost.m b/Sparkle/SUHost.m index 13dfe144..99719ac2 100644 --- a/Sparkle/SUHost.m +++ b/Sparkle/SUHost.m @@ -127,7 +127,12 @@ if (!keyPath) { return nil; } - return [NSString stringWithContentsOfFile:keyPath encoding:NSASCIIStringEncoding error:nil]; + NSError *error = nil; + key = [NSString stringWithContentsOfFile:keyPath encoding:NSASCIIStringEncoding error:&error]; + if (error) { + SULog(SULogLevelError, @"Error loading %@: %@", keyPath, error); + } + return key; } - (NSString * __nullable)publicDSAKeyFileKey