Skip to content

Commit 6adade2

Browse files
authored
Merge pull request #898 from PlayEveryWare/fix/missing-config-exception
fix(config,IO) : Add missing if statement
2 parents 7da1f68 + fbfa26d commit 6adade2

File tree

1 file changed

+6
-6
lines changed
  • com.playeveryware.eos/Runtime/Core/Config

1 file changed

+6
-6
lines changed

com.playeveryware.eos/Runtime/Core/Config/Config.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,18 +290,18 @@ private async Task EnsureConfigFileExistsAsync()
290290
{
291291
bool fileExists = await FileSystemUtility.FileExistsAsync(FilePath);
292292

293-
#if UNITY_EDITOR
294293
if (!fileExists)
295294
{
295+
#if UNITY_EDITOR
296296
await WriteAsync();
297-
}
298297
#else
299-
// If the editor is not running, then the config file not
300-
// existing should throw an error.
301-
throw new FileNotFoundException(
298+
// If the editor is not running, then the config file not
299+
// existing should throw an error.
300+
throw new FileNotFoundException(
302301
$"Config file \"{FilePath}\" does not exist.");
303302
#endif
304-
}
303+
}
304+
}
305305

306306
// Functions declared below should only ever be utilized in the editor.
307307
// They are so divided to guarantee separation of concerns.

0 commit comments

Comments
 (0)