Fix bug with read-only permission assertion

https://discord.com/channels/1099468797410283540/1147073444219977779
This commit is contained in:
pizzaboxer 2023-09-01 10:37:25 +01:00
parent ddd053e8b6
commit d8feba85b7
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8

View File

@ -24,7 +24,7 @@ namespace Bloxstrap.Utility
{
var fileInfo = new FileInfo(filePath);
if (!fileInfo.IsReadOnly)
if (!fileInfo.Exists || !fileInfo.IsReadOnly)
return;
fileInfo.IsReadOnly = false;