diff options
Diffstat (limited to 'lib/Handle.cc')
-rw-r--r-- | lib/Handle.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc index 84004b0..ca2c971 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -246,10 +246,12 @@ void Handle::close() throw (GeneralException) { } } } else { - int err = ::close(h); - if (err) { - throw GeneralException(String(_("Error during close: ")) + strerror(errno)); - } + if (!hFile) { + int err = ::close(h); + if (err) { + throw GeneralException(String(_("Error during close: ")) + strerror(errno)); + } + } } } |