mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 00:27:13 +00:00
Change temporary file creation to tmpfile(). FullName was not initialized
correctly before and it's only by chance that this worked at all. svn path=/trunk/; revision=12741
This commit is contained in:
parent
afbaa12f82
commit
c60f00807e
1 changed files with 2 additions and 1 deletions
|
@ -188,7 +188,7 @@ unsigned long CCFDATAStorage::Truncate()
|
||||||
return CAB_STATUS_FAILURE;
|
return CAB_STATUS_FAILURE;
|
||||||
#else /* !WIN32 */
|
#else /* !WIN32 */
|
||||||
fclose(FileHandle);
|
fclose(FileHandle);
|
||||||
FileHandle = fopen(FullName, "w+b");
|
FileHandle = tmpfile();
|
||||||
if (FileHandle == NULL) {
|
if (FileHandle == NULL) {
|
||||||
DPRINT(MID_TRACE, ("ERROR '%d'.\n", (unsigned int)errno));
|
DPRINT(MID_TRACE, ("ERROR '%d'.\n", (unsigned int)errno));
|
||||||
return CAB_STATUS_FAILURE;
|
return CAB_STATUS_FAILURE;
|
||||||
|
@ -532,6 +532,7 @@ bool CCabinet::SetCabinetReservedFile(char* FileName)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else /* !WIN32 */
|
#else /* !WIN32 */
|
||||||
|
|
||||||
FileHandle = fopen(ConvertPath(FileName, true), "rb");
|
FileHandle = fopen(ConvertPath(FileName, true), "rb");
|
||||||
if (FileHandle == NULL) {
|
if (FileHandle == NULL) {
|
||||||
DPRINT(MID_TRACE, ("Cannot open cabinet reserved file.\n"));
|
DPRINT(MID_TRACE, ("Cannot open cabinet reserved file.\n"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue