From c06443c7d15af6a808aefc5edac5828924e608aa Mon Sep 17 00:00:00 2001 From: MaxED Date: Fri, 13 May 2016 23:01:36 +0000 Subject: [PATCH] Fixed inability to load resources from the map wad when it had read-only flag set. --- Source/Core/Data/DataManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Data/DataManager.cs b/Source/Core/Data/DataManager.cs index 52e98221..de4e3068 100644 --- a/Source/Core/Data/DataManager.cs +++ b/Source/Core/Data/DataManager.cs @@ -373,7 +373,7 @@ namespace CodeImp.DoomBuilder.Data { // WAD file container case DataLocation.RESOURCE_WAD: - c = new WADReader(dl, configlist.Contains(dl)); + c = new WADReader(dl, configlist.Contains(dl) || new FileInfo(dl.location).IsReadOnly); if(((WADReader)c).WadFile.IsOfficialIWAD) //mxd { if(!string.IsNullOrEmpty(prevofficialiwad)) @@ -389,7 +389,7 @@ namespace CodeImp.DoomBuilder.Data // PK3 file container case DataLocation.RESOURCE_PK3: - c = new PK3Reader(dl, configlist.Contains(dl)); + c = new PK3Reader(dl, configlist.Contains(dl) || new FileInfo(dl.location).IsReadOnly); break; } }