mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[CABMAN] Second addendum to 7afc888
: Use the old code to make Linux happy.
Sorry for the noise, but I do not have a Linux machine to test the build. :-/
This commit is contained in:
parent
2949b2f08b
commit
0e4dd0fcbc
1 changed files with 7 additions and 1 deletions
|
@ -55,6 +55,7 @@ CCFDATAStorage::~CCFDATAStorage()
|
||||||
*/
|
*/
|
||||||
ULONG CCFDATAStorage::Create()
|
ULONG CCFDATAStorage::Create()
|
||||||
{
|
{
|
||||||
|
#if defined(_WIN32)
|
||||||
char TmpName[PATH_MAX];
|
char TmpName[PATH_MAX];
|
||||||
char *pName;
|
char *pName;
|
||||||
int length;
|
int length;
|
||||||
|
@ -77,7 +78,10 @@ ULONG CCFDATAStorage::Create()
|
||||||
FileHandle = fopen(FullName, "w+b");
|
FileHandle = fopen(FullName, "w+b");
|
||||||
if (FileHandle == NULL)
|
if (FileHandle == NULL)
|
||||||
return CAB_STATUS_CANNOT_CREATE;
|
return CAB_STATUS_CANNOT_CREATE;
|
||||||
|
#else
|
||||||
|
if ((FileHandle = tmpfile()) == NULL)
|
||||||
|
return CAB_STATUS_CANNOT_CREATE;
|
||||||
|
#endif
|
||||||
return CAB_STATUS_SUCCESS;
|
return CAB_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +102,9 @@ ULONG CCFDATAStorage::Destroy()
|
||||||
|
|
||||||
FileHandle = NULL;
|
FileHandle = NULL;
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
remove(FullName);
|
remove(FullName);
|
||||||
|
#endif
|
||||||
|
|
||||||
return CAB_STATUS_SUCCESS;
|
return CAB_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue