diff options
author | Max Horn | 2004-11-27 15:09:53 +0000 |
---|---|---|
committer | Max Horn | 2004-11-27 15:09:53 +0000 |
commit | b78ac6a18b2cb851718ef84b04557f7fba8d399a (patch) | |
tree | 64e637229fef01b43835875a76444eea4ffd1a7f /sky | |
parent | 8d0ab890f8597c90d8f51caf1ed416e1df60848a (diff) | |
download | scummvm-rg350-b78ac6a18b2cb851718ef84b04557f7fba8d399a.tar.gz scummvm-rg350-b78ac6a18b2cb851718ef84b04557f7fba8d399a.tar.bz2 scummvm-rg350-b78ac6a18b2cb851718ef84b04557f7fba8d399a.zip |
Make use of our String class instead of juggling with char pointers; added File::exists method
svn-id: r15913
Diffstat (limited to 'sky')
-rw-r--r-- | sky/disk.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sky/disk.cpp b/sky/disk.cpp index 976b2ca9d4..2fd4917048 100644 --- a/sky/disk.cpp +++ b/sky/disk.cpp @@ -384,14 +384,10 @@ void Disk::dumpFile(uint16 fileNr) { filePtr = loadFile(fileNr); sprintf(buf, "dumps/file-%d.dmp", fileNr); - out.open(buf, File::kFileReadMode, ""); - if (out.isOpen() == false) { - out.open(buf, File::kFileWriteMode, ""); - if (out.isOpen() == false) - return; - out.write(filePtr, _lastLoadedFileSize); + if (!out.exists(buf, "")) { + if (out.open(buf, File::kFileWriteMode, "")) + out.write(filePtr, _lastLoadedFileSize); } - out.close(); free(filePtr); } |