Don't generate report files with '/', '\\' or '?' characters.

This commit is contained in:
2017-06-03 01:22:59 +01:00
parent 39e72a1cf9
commit 9fd65d9e6f
2 changed files with 5 additions and 18 deletions

View File

@@ -1,20 +1,5 @@
* Main.cs:
Submit pending statistics on bootup.
* Commands/Statistics.cs:
Call to statistics from metadata.
* Commands/DeviceReport.cs:
Added code to submit statistics.
* ChangeLog:
* ChangeLog:
* DiscImageChef.csproj:
Project file formatting.
Don't generate report files with '/', '\\' or '?' characters.
2017-05-28 Natalia Portillo <claunia@claunia.com>

View File

@@ -80,6 +80,8 @@ namespace DiscImageChef.Commands
else
xmlFile = dev.Model + ".xml";
xmlFile = xmlFile.Replace('\\', '_').Replace('/', '_').Replace('?', '_');
switch(dev.Type)
{
case DeviceType.ATA:
@@ -87,10 +89,10 @@ namespace DiscImageChef.Commands
break;
case DeviceType.MMC:
case DeviceType.SecureDigital:
Core.Devices.Report.ATA.Report(dev, ref report, options.Debug, ref removable);
Core.Devices.Report.SecureDigital.Report(dev, ref report, options.Debug, ref removable);
break;
case DeviceType.NVMe:
Core.Devices.Report.ATA.Report(dev, ref report, options.Debug, ref removable);
Core.Devices.Report.NVMe.Report(dev, ref report, options.Debug, ref removable);
break;
case DeviceType.ATAPI:
case DeviceType.SCSI: