mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Possible 'null' assignment to entity marked with 'NotNull' attribute.
This commit is contained in:
@@ -77,12 +77,12 @@ namespace DiscImageChef.Server
|
||||
|
||||
try
|
||||
{
|
||||
if(!File.Exists(Path.Combine(HostingEnvironment.MapPath("~"), "Statistics",
|
||||
if(!File.Exists(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(), "Statistics",
|
||||
"Statistics.xml")))
|
||||
{
|
||||
#if DEBUG
|
||||
content.InnerHtml = string.Format("<b>Sorry, cannot load data file \"{0}\"</b>",
|
||||
Path.Combine(HostingEnvironment.MapPath("~"),
|
||||
Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
|
||||
"Statistics", "Statistics.xml"));
|
||||
#else
|
||||
content.InnerHtml = "<b>Sorry, cannot load data file</b>";
|
||||
@@ -94,7 +94,7 @@ namespace DiscImageChef.Server
|
||||
|
||||
XmlSerializer xs = new XmlSerializer(statistics.GetType());
|
||||
FileStream fs =
|
||||
WaitForFile(Path.Combine(HostingEnvironment.MapPath("~"), "Statistics", "Statistics.xml"),
|
||||
WaitForFile(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(), "Statistics", "Statistics.xml"),
|
||||
FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
statistics = (Stats)xs.Deserialize(fs);
|
||||
fs.Close();
|
||||
|
||||
Reference in New Issue
Block a user