Skip to content

Commit 7b7b566

Browse files
committed
Check if config file exists before loading
1 parent 3f5d6aa commit 7b7b566

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Config/ConfigManager.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using MVR.FileManagementSecure;
1+
using MVR.FileManagementSecure;
22
using SimpleJSON;
33
using System.Linq;
44

@@ -54,8 +54,7 @@ public static void LoadConfig(string path, IConfigProvider provider)
5454
if (!CheckPath(ref path))
5555
return;
5656

57-
var directory = FileManagerSecure.GetDirectoryName(path);
58-
if (!FileManagerSecure.DirectoryExists(directory))
57+
if (!FileManagerSecure.FileExists(path))
5958
return;
6059

6160
var config = Controller.LoadJSON(path);

0 commit comments

Comments
 (0)