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:
@@ -74,10 +74,10 @@ namespace DiscImageChef.Server.Controllers
|
||||
|
||||
Random rng = new Random();
|
||||
string filename = string.Format("NewReport_{0:yyyyMMddHHmmssfff}_{1}.xml", DateTime.UtcNow, rng.Next());
|
||||
while(File.Exists(Path.Combine(HostingEnvironment.MapPath("~"), "Upload", filename))) filename = string.Format("NewReport_{0:yyyyMMddHHmmssfff}_{1}.xml", DateTime.UtcNow, rng.Next());
|
||||
while(File.Exists(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(), "Upload", filename))) filename = string.Format("NewReport_{0:yyyyMMddHHmmssfff}_{1}.xml", DateTime.UtcNow, rng.Next());
|
||||
|
||||
FileStream newFile =
|
||||
new FileStream(Path.Combine(HostingEnvironment.MapPath("~"), "Upload", filename),
|
||||
new FileStream(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(), "Upload", filename),
|
||||
FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None);
|
||||
xs.Serialize(newFile, newReport);
|
||||
newFile.Close();
|
||||
|
||||
Reference in New Issue
Block a user