]> git.tdb.fi Git - builder.git/blobdiff - source/copy.cpp
Change the default value of the cpu option to "none" since there's no actual autodete...
[builder.git] / source / copy.cpp
index 4cb42b707be686f59bd2725f089272f63b4e07d4..010d54113d74a859e9eb6e8416ca0e11e501790b 100644 (file)
@@ -42,14 +42,14 @@ void Copy::Worker::main()
 {
        FS::mkpath(FS::dirname(copy.dest), 0755);
 
-       try
-       {
-               // Remove old file.  Not doing this would cause Bad Stuff when installing libraries.
-               unlink(copy.dest);
-       }
-       catch(const SystemError &e)
+       // Remove old file.  Not doing this would cause Bad Stuff when installing libraries.
+       if(FS::exists(copy.dest))
        {
-               if(e.get_error_code()!=ENOENT)
+               try
+               {
+                       unlink(copy.dest);
+               }
+               catch(const Exception &e)
                {
                        IO::print(IO::cerr, "%s\n", e.what());
                        done=error=true;