Fixed inability to load resources from the map wad when it had read-only flag set.

This commit is contained in:
MaxED 2016-05-13 23:01:36 +00:00
parent 2499a2155a
commit c06443c7d1

View file

@ -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;
}
}