From 967f0fe6265cde464504a7ae5139076f4d35e792 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Sat, 29 May 2021 17:38:58 -0400 Subject: [PATCH] leave a copy of database provider packages in distribution folder --- Oqtane.Server/Infrastructure/InstallationManager.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Oqtane.Server/Infrastructure/InstallationManager.cs b/Oqtane.Server/Infrastructure/InstallationManager.cs index f5e730e4e..c36749687 100644 --- a/Oqtane.Server/Infrastructure/InstallationManager.cs +++ b/Oqtane.Server/Infrastructure/InstallationManager.cs @@ -45,7 +45,7 @@ public static bool InstallPackages(string webRootPath, string contentRootPath) Directory.CreateDirectory(sourceFolder); } - // move packages to secure location + // move packages to secure /Packages folder foreach (var folder in "Modules,Themes,Packages".Split(",")) { foreach(var file in Directory.GetFiles(Path.Combine(webRootPath, folder), "*.nupkg*")) @@ -55,7 +55,16 @@ public static bool InstallPackages(string webRootPath, string contentRootPath) { File.Delete(destinationFile); } - File.Move(file, destinationFile); + if (Path.GetExtension(destinationFile) == ".nupkg.bak") + { + // leave a copy in the current folder as it is distributed with the core framework + File.Copy(file, destinationFile); + } + else + { + // move to destination + File.Move(file, destinationFile); + } } }