OS independent file paths

This commit is contained in:
Sean Long
2020-04-17 16:25:00 -04:00
parent 2dd2216aa2
commit 70502cd881
13 changed files with 41 additions and 36 deletions

View File

@ -13,11 +13,11 @@ namespace Oqtane.Upgrade
string binfolder = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
// assumes that the application executable must be deployed to the /bin of the Oqtane.Server project
if (binfolder.Contains("Oqtane.Server\\bin"))
if (binfolder.Contains(Path.Combine("Oqtane.Server", "bin")))
{
// ie. binfolder = Oqtane.Server\bin\Debug\netcoreapp3.0\
string rootfolder = Directory.GetParent(binfolder).Parent.Parent.FullName;
string deployfolder = Path.Combine(rootfolder, "wwwroot\\Framework");
string deployfolder = Path.Combine(rootfolder, Path.Combine("wwwroot","Framework"));
if (Directory.Exists(deployfolder))
{