Fixed: check for skip before trying to open file.
This commit is contained in:
parent
f0371d345e
commit
85d85695e2
1 changed files with 5 additions and 5 deletions
|
@ -68,6 +68,11 @@ namespace arookas
|
|||
}
|
||||
}
|
||||
}
|
||||
// make sure the file has not been imported yet
|
||||
if (imports.Any(i => i.Name == fullPath))
|
||||
{
|
||||
return sunImportResult.Skipped;
|
||||
}
|
||||
// open the file
|
||||
try
|
||||
{
|
||||
|
@ -77,11 +82,6 @@ namespace arookas
|
|||
{
|
||||
return sunImportResult.FailedToLoad;
|
||||
}
|
||||
// make sure the file has not been imported yet
|
||||
if (imports.Any(i => i.Name == fullPath))
|
||||
{
|
||||
return sunImportResult.Skipped;
|
||||
}
|
||||
imports.Add(file);
|
||||
return sunImportResult.Loaded;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue