Fixed 'access denied' error when dats are set to be read-only
This commit is contained in:
parent
f6d6bab6af
commit
eacd79b3cc
1 changed files with 5 additions and 0 deletions
|
@ -114,6 +114,11 @@ public class ModPatchThread extends Thread {
|
||||||
int modsInstalled = 0;
|
int modsInstalled = 0;
|
||||||
int datsRepacked = 0;
|
int datsRepacked = 0;
|
||||||
|
|
||||||
|
// Don't let dats be read-only.
|
||||||
|
for ( BackedUpDat dat : allDats ) {
|
||||||
|
if ( dat.datFile.exists() ) dat.datFile.setWritable( true );
|
||||||
|
}
|
||||||
|
|
||||||
// Create backup dats, if necessary.
|
// Create backup dats, if necessary.
|
||||||
for ( BackedUpDat dat : allDats ) {
|
for ( BackedUpDat dat : allDats ) {
|
||||||
if ( !dat.bakFile.exists() ) {
|
if ( !dat.bakFile.exists() ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue