]> git.tdb.fi Git - builder.git/commitdiff
Create destination path in Copy instead of source path
authorMikko Rasa <tdb@tdb.fi>
Sun, 3 Sep 2006 20:50:01 +0000 (20:50 +0000)
committerMikko Rasa <tdb@tdb.fi>
Sun, 3 Sep 2006 20:50:01 +0000 (20:50 +0000)
Initialize Copy::Worker::error to false

source/copy.cpp
source/copy.h

index c9cb3112ac25465d81ddf3a098eacbb5e46003ed..cdbbd48f1eead0b7c399a4b7ec7ad534252be2c4 100644 (file)
@@ -32,7 +32,8 @@ int Copy::check()
 
 void Copy::Worker::main()
 {
-       Path::mkpath(copy.src.subpath(0, copy.src.size()-1), 0755);
+       Path::mkpath(copy.dest.subpath(0, copy.dest.size()-1), 0755);
+       
        if(unlink(copy.dest.str().c_str())<0 && errno!=ENOENT)
        {
                int err=errno;
index 283ef48c5bbfa444b3f52a115562b041d1ca3cb3..ade21dd2b446e9c06d5afd13f7a72cf8bb518154 100644 (file)
@@ -16,7 +16,7 @@ private:
        class Worker: public Msp::Thread
        {
        public:
-               Worker(Copy &i): copy(i), done(false) { launch(); }
+               Worker(Copy &i): copy(i), done(false), error(false) { launch(); }
                bool get_done() const { return done; }
                bool get_error() const { return error; }
        private: