Mercurial > mm7
diff LOD.cpp @ 2179:f0b5ca2dfb73
_427E01_cast_spell continue
author | Ritor1 |
---|---|
date | Wed, 22 Jan 2014 17:34:05 +0600 |
parents | 43175acce099 |
children | 17b3e40daedc |
line wrap: on
line diff
--- a/LOD.cpp Wed Jan 22 00:05:10 2014 +0600 +++ b/LOD.cpp Wed Jan 22 17:34:05 2014 +0600 @@ -1643,10 +1643,15 @@ //replace old file by new with added data strcpy(NewFilename, pLODName); fclose(tmp_file); + bool test_file_opened1 = isFileOpened; CloseWriteFile(); //isFileOpened == false, current file + bool test_file_opened2 = isFileOpened; remove(NewFilename); + bool test_file_opened3 = isFileOpened; rename(Filename, NewFilename); + bool test_file_opened4 = isFileOpened; CloseWriteFile(); + bool test_file_opened5 = isFileOpened; //reload new LoadFile(pLODName, 0);//isFileOpened == true, next file if (isFileOpened == false) @@ -1663,7 +1668,7 @@ else pFile = fopen(pFilename, "rb+"); if (!pFile) - return false;//начало ошибки в сохранении на data\new.lod + return false;// возможно файл не закрыт, поэтому не открывается strcpy(pLODName, pFilename); fread(&header, sizeof(LOD::FileHeader), 1, pFile);