Changeset 523 for cpp/common/stl-util.cpp
- Timestamp:
- 07/03/16 17:36:35 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/stl-util.cpp
r460 r523 77 77 bool ok = false; 78 78 #ifdef USE_VIRTFILE 79 if (!isAbsolutePath(filename))79 // if (!isAbsolutePath(filename)) 80 80 { 81 81 VirtFILE *f=Vfopen(filename,FOPEN_READ_BINARY); … … 89 89 } 90 90 } 91 else91 // else 92 92 #endif 93 93 { … … 120 120 bool writeCompleteFile(const char* filename, const string& text, bool warn_on_fail) 121 121 { 122 #ifdef USE_VIRTFILE 123 VirtFILE *f = Vfopen(filename, FOPEN_WRITE_BINARY); 124 bool ok = f != NULL; 125 if (f) 126 { 127 int zapisane = f->Vwrite(text.c_str(), text.length(), 1); 128 delete f; 129 ok &= zapisane == 1; 130 } 131 #else 122 132 MFILE *f = mfopen(filename, FOPEN_WRITE_BINARY); 123 133 bool ok = f != NULL; … … 128 138 ok &= zapisane == 1; 129 139 } 140 #endif 130 141 if (warn_on_fail && !ok) 131 logPrintf("stl-util", "writeCompleteFile", LOG_WARN, " couldn't write file '%s'", filename);142 logPrintf("stl-util", "writeCompleteFile", LOG_WARN, "Couldn't write file '%s'", filename); 132 143 return ok; 133 144 }
Note: See TracChangeset
for help on using the changeset viewer.