renaming of the 3Blog3 setting => UserFilesRoot
All checks were successful
Dotnet build and test / build (pull_request) Successful in 33m37s

This commit is contained in:
Paul Schneider 2026-10-11 00:16:44 +01:00
commit 446b595077
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
18 changed files with 30 additions and 39 deletions

View file

@ -421,9 +421,9 @@ namespace Yavsc.Controllers
{
// Renames the blog files
var userdirinfo = new DirectoryInfo(
Path.Combine(_siteSettings.Blog,
Path.Combine(_siteSettings.UserFilesRoot,
oldUserName));
var newdir = Path.Combine(_siteSettings.Blog,
var newdir = Path.Combine(_siteSettings.UserFilesRoot,
model.UserName);
if (userdirinfo.Exists)
userdirinfo.MoveTo(newdir);

View file

@ -1267,7 +1267,7 @@ ADD COLUMN IF NOT EXISTS ""Moderated"" boolean NOT NULL DEFAULT FALSE;");
{
throw new InvalidOperationException("GitRepository path is not configured in SiteSettings.");
}
if (settings.Blog == null)
if (settings.UserFilesRoot == null)
{
throw new InvalidOperationException("Blog path is not configured in SiteSettings.");
}
@ -1284,7 +1284,7 @@ ADD COLUMN IF NOT EXISTS ""Moderated"" boolean NOT NULL DEFAULT FALSE;");
throw new InvalidOperationException("TempDir path is not configured in SiteSettings.");
}
var userFilesDirInfo = new DirectoryInfo(settings.Blog);
var userFilesDirInfo = new DirectoryInfo(settings.UserFilesRoot);
if (!userFilesDirInfo.Exists) userFilesDirInfo.Create();

View file

@ -23,10 +23,10 @@ public class Startup
ResourcesHelpers.GlobalLocalizer = localizer;
Config.SmtpSetup = smtpSettings.Value;
Config.Authority = siteSettings.Value.Authority;
string blogsDir = siteSettings.Value.Blog ?? throw new Exception("blogsDir is not set.");
string blogsDir = siteSettings.Value.UserFilesRoot ?? throw new Exception("blogsDir is not set.");
string billsDir = siteSettings.Value.Bills ?? throw new Exception("billsDir is not set.");
string tempDir = siteSettings.Value.TempDir ?? throw new Exception("tempDir is not set.");
Config.PayPalSettings = payPalSettings.Value;
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);

View file

@ -28,7 +28,7 @@ namespace Yavsc.ViewComponents
{
string uid = ViewContext.HttpContext.User.GetUserId();
return View(new UserDirectoryInfo(
siteSettings.Blog,
siteSettings.UserFilesRoot,
uid, dirname));
}
}

View file

@ -31,7 +31,7 @@
"Avatars": "avatars",
"Quota": 200000000,
"Bills": "bills",
"Blog": "blog",
"UserFilesRoot": "files",
"TempDir": "temp",
"DataDir": "data",
"GitRepository": "git"