Исправления
This commit is contained in:
parent
40b859466e
commit
242f4cedf1
@ -109,14 +109,14 @@ namespace ArmoredCar
|
||||
{
|
||||
if (!File.Exists(filename))
|
||||
{
|
||||
return false;
|
||||
throw new FileNotFoundException("Файл не найден");
|
||||
}
|
||||
using (FileStream f = new(filename, FileMode.Open))
|
||||
using (StreamReader sw = new(f, Encoding.UTF8))
|
||||
{
|
||||
|
||||
if (!sw.ReadLine().Contains("MapsCollection"))
|
||||
return false;
|
||||
throw new FileFormatException("Формат данных в файле не правильный");
|
||||
string? line;
|
||||
_mapStorages.Clear();
|
||||
while ((line = sw.ReadLine()) != null)
|
||||
|
Loading…
Reference in New Issue
Block a user