refactoring fs

This commit is contained in:
Paul Schneider 2016-11-14 12:17:07 +01:00
commit 5617a543eb
8 changed files with 98 additions and 68 deletions

View file

@ -16,12 +16,10 @@ namespace Yavsc
public void ConfigureFileServerApp(IApplicationBuilder app,
SiteSettings siteSettings, IHostingEnvironment env)
{
UserFilesDirName = Path.Combine(
env.WebRootPath,
siteSettings.UserFiles.DirName);
var userFilesDirInfo = new DirectoryInfo( siteSettings.UserFiles.DirName );
UserFilesDirName = userFilesDirInfo.FullName;
var rootInfo = new DirectoryInfo(UserFilesDirName);
if (!rootInfo.Exists) rootInfo.Create();
if (!userFilesDirInfo.Exists) userFilesDirInfo.Create();
UserFilesOptions = new FileServerOptions()
{