From a083405b4881a1f3d1fde3881f6618fae8be0431 Mon Sep 17 00:00:00 2001 From: Alexander Hendel Date: Tue, 7 Jul 2020 09:56:24 +0200 Subject: [PATCH] Fix directory seperator in InstallationManager --- Oqtane.Server/Infrastructure/InstallationManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Oqtane.Server/Infrastructure/InstallationManager.cs b/Oqtane.Server/Infrastructure/InstallationManager.cs index c6467c20..f9a6f01c 100644 --- a/Oqtane.Server/Infrastructure/InstallationManager.cs +++ b/Oqtane.Server/Infrastructure/InstallationManager.cs @@ -88,7 +88,7 @@ namespace Oqtane.Infrastructure // deploy to appropriate locations foreach (ZipArchiveEntry entry in archive.Entries) { - string foldername = Path.GetDirectoryName(entry.FullName).Split('\\')[0]; + string foldername = Path.GetDirectoryName(entry.FullName).Split(Path.DirectorySeparatorChar)[0]; string filename = Path.GetFileName(entry.FullName); switch (foldername) @@ -98,7 +98,7 @@ namespace Oqtane.Infrastructure ExtractFile(entry, filename); break; case "wwwroot": - filename = Path.Combine(webRootPath, Utilities.PathCombine(entry.FullName.Replace("wwwroot/", "").Split('/'))); + filename = Path.Combine(webRootPath, Utilities.PathCombine(entry.FullName.Replace($"wwwroot{Path.DirectorySeparatorChar}", "").Split(Path.DirectorySeparatorChar))); ExtractFile(entry, filename); break; }