aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FileStream.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/FileStream.cpp b/src/FileStream.cpp
index a7b3e6a..45499e1 100644
--- a/src/FileStream.cpp
+++ b/src/FileStream.cpp
@@ -113,6 +113,7 @@ static bool BaseFile_Create(TFileStream * pStream)
if(handle == -1)
{
nLastError = errno;
+ pStream->Base.File.hFile = INVALID_HANDLE_VALUE;
return false;
}
@@ -165,6 +166,7 @@ static bool BaseFile_Open(TFileStream * pStream, const TCHAR * szFileName, DWORD
if(handle == -1)
{
nLastError = errno;
+ pStream->Base.File.hFile = INVALID_HANDLE_VALUE;
return false;
}
@@ -173,6 +175,7 @@ static bool BaseFile_Open(TFileStream * pStream, const TCHAR * szFileName, DWORD
{
nLastError = errno;
close(handle);
+ pStream->Base.File.hFile = INVALID_HANDLE_VALUE;
return false;
}