From 26a9d0a09a29ea307a7ef4c629ed70dc917169f4 Mon Sep 17 00:00:00 2001 From: Stanley Goldman Date: Tue, 23 Oct 2018 11:54:26 -0400 Subject: [PATCH 1/2] Fixing the logging of CopyHelper --- src/GitHub.Api/Installer/CopyHelper.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GitHub.Api/Installer/CopyHelper.cs b/src/GitHub.Api/Installer/CopyHelper.cs index 3b7f52290..0876ec19b 100644 --- a/src/GitHub.Api/Installer/CopyHelper.cs +++ b/src/GitHub.Api/Installer/CopyHelper.cs @@ -12,7 +12,7 @@ public static class CopyHelper public static void Copy(NPath fromPath, NPath toPath) { - Logger.Trace("Copying from " + fromPath + " to " + toPath + "."); + Logger.Trace("Copying from {0} to {1}", fromPath, toPath); try { @@ -28,7 +28,7 @@ public static void Copy(NPath fromPath, NPath toPath) } catch (Exception ex2) { - Logger.Error(ex1, "Error copying contents."); + Logger.Error(ex2, "Error copying contents."); throw; } } @@ -39,7 +39,7 @@ public static void Copy(NPath fromPath, NPath toPath) } public static void CopyFolder(NPath fromPath, NPath toPath) { - Logger.Trace("CopyFolder fromPath: {0} toPath:{1}", fromPath.ToString(), toPath.ToString()); + Logger.Trace("CopyFolder from {0} to {1}", fromPath, toPath); toPath.DeleteIfExists(); toPath.EnsureParentDirectoryExists(); fromPath.Move(toPath); @@ -47,7 +47,7 @@ public static void CopyFolder(NPath fromPath, NPath toPath) public static void CopyFolderContents(NPath fromPath, NPath toPath) { - Logger.Trace("CopyFolder Contents fromPath: {0} toPath:{1}", fromPath.ToString(), toPath.ToString()); + Logger.Trace("CopyFolder Contents from {0} to {1}", fromPath, toPath); toPath.DeleteContents(); fromPath.MoveFiles(toPath, true); } From 239d6433a13ffa5a92907a307ef979072be9d60e Mon Sep 17 00:00:00 2001 From: Stanley Goldman Date: Wed, 12 Dec 2018 09:52:44 -0500 Subject: [PATCH 2/2] Update CopyHelper.cs --- src/GitHub.Api/Installer/CopyHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHub.Api/Installer/CopyHelper.cs b/src/GitHub.Api/Installer/CopyHelper.cs index 0876ec19b..98faecb62 100644 --- a/src/GitHub.Api/Installer/CopyHelper.cs +++ b/src/GitHub.Api/Installer/CopyHelper.cs @@ -47,7 +47,7 @@ public static void CopyFolder(NPath fromPath, NPath toPath) public static void CopyFolderContents(NPath fromPath, NPath toPath) { - Logger.Trace("CopyFolder Contents from {0} to {1}", fromPath, toPath); + Logger.Trace("CopyFolderContents from {0} to {1}", fromPath, toPath); toPath.DeleteContents(); fromPath.MoveFiles(toPath, true); }