Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 02404a6

Browse files
committed
Fix #72
1 parent 4bb6300 commit 02404a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

UI/MainWindow.xaml.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ public bool TryLoadSourceFile(string filePath, bool UseBlendoverEffect = true, b
9494
if (extension == "sp" || extension == "inc" || extension == "txt" || extension == "cfg" || extension == "ini")
9595
{
9696
string finalPath = fileInfo.FullName;
97+
try
98+
{
99+
File.GetAccessControl(finalPath);
100+
}
101+
catch (UnauthorizedAccessException)
102+
{
103+
return false;
104+
}
97105
EditorElement[] editors = GetAllEditorElements();
98106
if (editors != null)
99107
{

0 commit comments

Comments
 (0)