Merge pull request #846 from sbwalker/master
fix folder parsing issue specific to Azure environment where WebRootPath contains 2 wwwroot nested folders
This commit is contained in:
commit
03926bccb0
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
@ -103,7 +103,7 @@ namespace Oqtane.Infrastructure
|
|||
assets.Add(filename);
|
||||
break;
|
||||
case "wwwroot":
|
||||
filename = Path.Combine(webRootPath.Replace(Path.DirectorySeparatorChar + "wwwroot", ""), Utilities.PathCombine(entry.FullName.Split('/')));
|
||||
filename = Path.Combine(webRootPath, Utilities.PathCombine(entry.FullName.Replace("wwwroot/", "").Split('/')));
|
||||
ExtractFile(entry, filename);
|
||||
assets.Add(filename);
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
|
@ -58,7 +58,7 @@ namespace Oqtane.Upgrade
|
|||
files.Add(Path.Combine(binfolder, filename));
|
||||
break;
|
||||
case "wwwroot":
|
||||
files.Add(Path.Combine(webrootfolder.Replace(Path.DirectorySeparatorChar + "wwwroot", ""), entry.FullName.Replace('/', Path.DirectorySeparatorChar)));
|
||||
files.Add(Path.Combine(webrootfolder, entry.FullName.Replace("wwwroot/", "").Replace('/', Path.DirectorySeparatorChar)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ namespace Oqtane.Upgrade
|
|||
filename = Path.Combine(binfolder, filename);
|
||||
break;
|
||||
case "wwwroot":
|
||||
filename = Path.Combine(webrootfolder.Replace(Path.DirectorySeparatorChar + "wwwroot", ""), entry.FullName.Replace('/', Path.DirectorySeparatorChar));
|
||||
filename = Path.Combine(webrootfolder, entry.FullName.Replace("wwwroot/", "").Replace('/', Path.DirectorySeparatorChar));
|
||||
break;
|
||||
}
|
||||
if (files.Contains(filename))
|
||||
|
|
Loading…
Reference in New Issue
Block a user