1
1
forked from 0ad/0ad

fix: don't raise warnings when overwriting previous realDirectory (e.g. in the case of multiple mods mounting into the same directory) causes previous directory watches to be canceled

This was SVN commit r7202.
This commit is contained in:
janwas 2009-11-16 21:01:36 +00:00
parent 781538313c
commit 22ac887785

View File

@ -220,7 +220,7 @@ public:
return m_next; return m_next;
} }
//private: private:
IntrusiveLink* m_prev; IntrusiveLink* m_prev;
IntrusiveLink* m_next; IntrusiveLink* m_next;
}; };
@ -284,6 +284,8 @@ public:
} }
LibError Poll(size_t& bytesTransferred, uintptr_t& key, OVERLAPPED*& ovl) LibError Poll(size_t& bytesTransferred, uintptr_t& key, OVERLAPPED*& ovl)
{
for(;;) // don't return abort notifications to caller
{ {
DWORD dwBytesTransferred = 0; DWORD dwBytesTransferred = 0;
ULONG_PTR ulKey = 0; ULONG_PTR ulKey = 0;
@ -294,10 +296,14 @@ public:
key = uintptr_t(ulKey); key = uintptr_t(ulKey);
if(gotPacket) if(gotPacket)
return INFO::OK; return INFO::OK;
if(GetLastError() == WAIT_TIMEOUT) if(GetLastError() == WAIT_TIMEOUT)
return ERR::AGAIN; // NOWARN return ERR::AGAIN; // NOWARN (nothing pending)
// else: there was actually an error else if(GetLastError() == ERROR_OPERATION_ABORTED)
return LibError_from_GLE(); continue; // watch was canceled - ignore
else
return LibError_from_GLE(); // actual error
}
} }
private: private: