Browse Source

ensure executable bit is set

David Rose 16 years ago
parent
commit
66f88cd348
2 changed files with 6 additions and 2 deletions
  1. 3 2
      direct/src/plugin/p3dDownload.cxx
  2. 3 0
      direct/src/plugin/p3dPackage.cxx

+ 3 - 2
direct/src/plugin/p3dDownload.cxx

@@ -168,7 +168,8 @@ download_progress() {
   if (now - _last_reported_time > 10) {
     _last_reported_time = now;
     nout << "Downloading " << get_url() << ": " 
-         << int(get_download_progress() * 1000.0) / 10.0 << "\n";
+         << int(get_download_progress() * 1000.0) / 10.0 
+         << ", " << this << "\n";
   }
 }
 
@@ -184,5 +185,5 @@ void P3DDownload::
 download_finished(bool success) {
   nout << "Downloaded " << get_url() << ": " 
        << int(get_download_progress() * 1000.0) / 10.0 
-       << ", success = " << success << "\n";
+       << ", " << this << ", success = " << success << "\n";
 }

+ 3 - 0
direct/src/plugin/p3dPackage.cxx

@@ -698,6 +698,9 @@ got_desc_file(TiXmlDocument *doc, bool freshly_downloaded) {
       nout << "File is incorrect: " << (*ei).get_filename() << "\n";
       all_extracts_ok = false;
     }
+
+    // Make sure all extracts are still marked executable.
+    chmod((*ei).get_pathname(_package_dir).c_str(), 0555);
   }
 
   if (all_extracts_ok) {