aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
Diffstat (limited to 'sword2')
-rw-r--r--sword2/resman.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/sword2/resman.cpp b/sword2/resman.cpp
index 76f3799de0..16ea8c0d3e 100644
--- a/sword2/resman.cpp
+++ b/sword2/resman.cpp
@@ -512,13 +512,10 @@ byte *ResourceManager::openResource(uint32 res, bool dump) {
sprintf(buf, "dumps/%s-%d.dmp", tag, res);
#endif
- if (!out.open(buf, File::kFileReadMode, "")) {
+ if (!out.exists(buf, "")) {
if (out.open(buf, File::kFileWriteMode, ""))
out.write(_resList[res].ptr, len);
}
-
- if (out.isOpen())
- out.close();
}
// close the cluster