From 8a171528edbd9b63855dc467244bd4bdb62bd5f7 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Thu, 25 Aug 2016 09:53:28 +0200 Subject: [PATCH] GH-232 Use NSError's description for the alert --- VimR/GeneralPrefPane.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/VimR/GeneralPrefPane.swift b/VimR/GeneralPrefPane.swift index 332b6b65..173e5719 100644 --- a/VimR/GeneralPrefPane.swift +++ b/VimR/GeneralPrefPane.swift @@ -159,9 +159,8 @@ extension GeneralPrefPane { do { try NSFileManager.defaultManager().copyItemAtURL(vimrUrl, toURL: targetUrl) - } catch { - let pathInfo = targetUrl.path == nil ? "." : " to '\(targetUrl.path!)'." - self.alert(title: "Error copying 'vimr'", info: "The CLI tool 'vimr' could not be copied\(pathInfo)") + } catch let err as NSError { + self.alert(title: "Error copying 'vimr'", info: err.localizedDescription) } } }