Check if files for ways and tags exist upon import.
This commit is contained in:
parent
87e260562f
commit
349ed9da94
@ -251,7 +251,9 @@ public class RegionConverter
|
|||||||
throw new FileNotFoundException("Region does not exist");
|
throw new FileNotFoundException("Region does not exist");
|
||||||
|
|
||||||
#pragma warning disable SYSLIB0011
|
#pragma warning disable SYSLIB0011
|
||||||
using (FileStream wayFileStream = new FileStream(Path.Join(folderPath, regionHash.ToString(), RegionConverter.WaysFileName), FileMode.Open))
|
string waysPath = Path.Join(folderPath, regionHash.ToString(), RegionConverter.WaysFileName);
|
||||||
|
if(File.Exists(waysPath))
|
||||||
|
using (FileStream wayFileStream = new FileStream(waysPath, FileMode.Open))
|
||||||
{
|
{
|
||||||
while (wayFileStream.Position < wayFileStream.Length)
|
while (wayFileStream.Position < wayFileStream.Length)
|
||||||
{
|
{
|
||||||
@ -269,7 +271,9 @@ public class RegionConverter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
using (FileStream tagsFileStream = new FileStream(Path.Join(folderPath, regionHash.ToString(), RegionConverter.TagsFileName), FileMode.Open))
|
string tagsPath = Path.Join(folderPath, regionHash.ToString(), RegionConverter.TagsFileName);
|
||||||
|
if(File.Exists(tagsPath))
|
||||||
|
using (FileStream tagsFileStream = new FileStream(tagsPath, FileMode.Open))
|
||||||
{
|
{
|
||||||
while (tagsFileStream.Position < tagsFileStream.Length)
|
while (tagsFileStream.Position < tagsFileStream.Length)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user