From dffe4cab48065f2af32ff90b52e82ba4c44009f4 Mon Sep 17 00:00:00 2001 From: pixel Date: Thu, 4 Dec 2003 00:56:47 +0000 Subject: Pffff.... --- lib/Handle.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/Handle.cc b/lib/Handle.cc index ca2c971..7068843 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -253,14 +253,13 @@ void Handle::close() throw (GeneralException) { } } } - } - #ifdef _WIN32 - if (hFile) { - CloseHandle(hFile); - hFile = 0; - } + if (hFile) { + CloseHandle(hFile); + hFile = 0; + } #endif + } if (mapped) { munmap(); @@ -494,7 +493,7 @@ void copyone(Handle * s, Handle * d, ssize_t size) { } } -#define BSIZE 2048 +#define BSIZE 20480 void copy(Handle * s, Handle * d, ssize_t size) { long i; @@ -513,7 +512,8 @@ void copy(Handle * s, Handle * d, ssize_t size) { } if (!r) break; - size -= r; + if (size > 0) + size -= r; } } -- cgit v1.2.3