diff options
author | Stef Walter <stef@thewalter.net> | 2004-08-23 22:35:21 +0000 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2004-08-23 22:35:21 +0000 |
commit | ff26b4137c6dc3d622336e725bd6f5630b301027 (patch) | |
tree | 536fa628fb74422adcd7486c5e483e6a6c5e354d /win32/droplet/replace.cpp | |
parent | 8396a35831f126f9b7281746b90f6b00effd6da2 (diff) |
Fixes and changes due to RTF converter not working properly.
Diffstat (limited to 'win32/droplet/replace.cpp')
-rw-r--r-- | win32/droplet/replace.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/win32/droplet/replace.cpp b/win32/droplet/replace.cpp index 8a7b51b..624695d 100644 --- a/win32/droplet/replace.cpp +++ b/win32/droplet/replace.cpp @@ -131,7 +131,7 @@ int Replace::matchStatus(r_stream* stream, r_replace* repl) ASSERT_PTR(replace); replace->m_dlg.onReplaced(); - return replace->m_dlg.isCancelled() ? 1 : 0; + return replace->m_dlg.isCancelled() ? 0 : 1; } @@ -174,8 +174,14 @@ HRESULT Replace::replaceFolder(LPCTSTR folder) if(FAILED(r)) RETURN(r); + + // Check and see if we've been cancelled + if(m_dlg.isCancelled()) + RETURN(ret); + if(r == S_OK) ret = r; + } while(FindNextFile(hFindFile, &findData)); } @@ -421,6 +427,13 @@ HRESULT Replace::replaceBuffer(byte* data, size_t size, HANDLE out) // Increment last batch data += (batchSize - ctx.stream.availIn); size -= (batchSize - ctx.stream.availIn); + + // Check and see if we've been cancelled + if(m_dlg.isCancelled()) + { + dirty = false; + RETURN(S_FALSE); + } } // Clears and prepares for next file |