Fix warnings.

This commit is contained in:
2020-02-10 03:09:42 +00:00
parent c8da350f18
commit ed5aacd34e
3 changed files with 9 additions and 9 deletions

View File

@@ -65,7 +65,7 @@ namespace Marechai.Areas.Admin.Controllers
}
// POST: CompanyLogos/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
// TODO: Upload
[HttpPost]
@@ -94,7 +94,7 @@ namespace Marechai.Areas.Admin.Controllers
XmlDocument xml = new XmlDocument();
xml.LoadXml(svgStr);
}
catch(XmlException e)
catch(XmlException)
{
companyLogo.SvgLogo = null;
companyLogo.ErrorMessage = "Not a valid SVG file.";
@@ -150,7 +150,7 @@ namespace Marechai.Areas.Admin.Controllers
foreach(int multiplier in new[] {1, 2, 3})
{
if(!Directory.Exists(Path.Combine(hostingEnvironment.WebRootPath, "assets/logos", format,
$"{multiplier}x"))) ;
$"{multiplier}x")))
Directory.CreateDirectory(Path.Combine(hostingEnvironment.WebRootPath, "assets/logos",
format, $"{multiplier}x"));
@@ -196,7 +196,7 @@ namespace Marechai.Areas.Admin.Controllers
foreach(string format in new[] {"png", "webp"})
{
if(!Directory.Exists(Path.Combine(hostingEnvironment.WebRootPath, "assets/logos/thumbs",
format))) ;
format)))
Directory.CreateDirectory(Path.Combine(hostingEnvironment.WebRootPath, "assets/logos/thumbs",
format));
@@ -214,7 +214,7 @@ namespace Marechai.Areas.Admin.Controllers
foreach(int multiplier in new[] {1, 2, 3})
{
if(!Directory.Exists(Path.Combine(hostingEnvironment.WebRootPath, "assets/logos/thumbs",
format, $"{multiplier}x"))) ;
format, $"{multiplier}x")))
Directory.CreateDirectory(Path.Combine(hostingEnvironment.WebRootPath,
"assets/logos/thumbs", format, $"{multiplier}x"));
@@ -286,7 +286,7 @@ namespace Marechai.Areas.Admin.Controllers
}
// POST: CompanyLogos/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]

View File

@@ -51,7 +51,7 @@ namespace Marechai.Helpers
foreach(string format in new[] {"png", "webp"})
{
if(!Directory.Exists(Path.Combine("wwwroot/assets/flags/countries", format))) ;
if(!Directory.Exists(Path.Combine("wwwroot/assets/flags/countries", format)))
Directory.CreateDirectory(Path.Combine("wwwroot/assets/flags/countries", format));
SKEncodedImageFormat skFormat;
@@ -68,7 +68,7 @@ namespace Marechai.Helpers
foreach(int multiplier in new[] {1, 2, 3})
{
if(!Directory.Exists(Path.Combine("wwwroot/assets/flags/countries", format, $"{multiplier}x"))
) ;
)
Directory.CreateDirectory(Path.Combine("wwwroot/assets/flags/countries", format,
$"{multiplier}x"));

View File

@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<Version>3.0.99.889</Version>
<Version>3.0.99.891</Version>
<Company>Canary Islands Computer Museum</Company>
<Copyright>Copyright © 2003-2020 Natalia Portillo</Copyright>
<Product>Canary Islands Computer Museum Website</Product>