mirror of
https://github.com/hufrea/byedpi.git
synced 2024-11-26 08:45:32 +03:00
temp file in memory, remove tabs
This commit is contained in:
parent
3da60eb357
commit
542a04bffb
1 changed files with 61 additions and 64 deletions
7
desync.c
7
desync.c
|
@ -146,7 +146,7 @@ int send_fake(int sfd, char *buffer,
|
||||||
|
|
||||||
HANDLE hfile = CreateFileA(path, GENERIC_READ | GENERIC_WRITE,
|
HANDLE hfile = CreateFileA(path, GENERIC_READ | GENERIC_WRITE,
|
||||||
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
|
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
|
||||||
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE, NULL);
|
||||||
if (hfile == INVALID_HANDLE_VALUE) {
|
if (hfile == INVALID_HANDLE_VALUE) {
|
||||||
uniperror("CreateFileA");
|
uniperror("CreateFileA");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -209,12 +209,9 @@ int send_fake(int sfd, char *buffer,
|
||||||
if (!CloseHandle(hfile)) {
|
if (!CloseHandle(hfile)) {
|
||||||
uniperror("CloseHandle hfile");
|
uniperror("CloseHandle hfile");
|
||||||
}
|
}
|
||||||
if (!CloseHandle(ov.hEvent)) {
|
if (ov.hEvent && !CloseHandle(ov.hEvent)) {
|
||||||
uniperror("CloseHandle hEvent");
|
uniperror("CloseHandle hEvent");
|
||||||
}
|
}
|
||||||
if (!DeleteFile(path)) {
|
|
||||||
uniperror("DeleteFile");
|
|
||||||
}
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue