summaryrefslogtreecommitdiff
path: root/lib/CopyJob.cc
diff options
context:
space:
mode:
authorPixel <Pixel>2001-12-08 13:57:52 +0000
committerPixel <Pixel>2001-12-08 13:57:52 +0000
commita83a43e57be59ed407d98f465d02953af5ae0160 (patch)
tree91aa1ea4a24e5b85ef26686828054e858cec21aa /lib/CopyJob.cc
parentc54dfe9b844f6c5d8969669f5144e721e2af82b0 (diff)
*hum* some changes...
Diffstat (limited to 'lib/CopyJob.cc')
-rw-r--r--lib/CopyJob.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/CopyJob.cc b/lib/CopyJob.cc
index 864706b..1e151c3 100644
--- a/lib/CopyJob.cc
+++ b/lib/CopyJob.cc
@@ -2,13 +2,21 @@
#include "General.h"
#include "config.h"
-CopyJob::CopyJob(Handle * as, Handle * ad, ssize_t asiz, bool ads) : s(as), d(ad), ds(ads), siz(asiz), cursiz(0), r(0) {
+CopyJob::CopyJob(Handle * as, Handle * ad, ssize_t asiz, bool ads, bool add) : s(as), d(ad), ds(ads), dd(add), siz(asiz), cursiz(0), r(0) {
s->SetNonBlock();
d->SetNonBlock();
WaitFor(s, W4_READING);
}
-CopyJob::~CopyJob() { }
+CopyJob::~CopyJob() {
+ if (ds) {
+ delete s;
+ }
+
+ if (dd) {
+ delete d;
+ }
+}
int CopyJob::Do() throw (GeneralException) {
int tr;
@@ -44,10 +52,6 @@ int CopyJob::Do() throw (GeneralException) {
Suspend(TASK_ON_HOLD);
}
- if (ds) {
- delete s;
- }
-
return TASK_DONE;
}