Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, October 15, 2026

Diff for scripts/cgi/cvsweb/cvsweb.cgi between version 1.14 and 1.15

version 1.14, 2002/11/22 20:22:23 version 1.15, 2002/11/25 12:33:34
Line 45 
Line 45 
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF  # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.  # SUCH DAMAGE.
 #  #
 # $FreeBSD: projects/cvsweb/cvsweb.cgi,v 1.136 2002/11/16 13:26:40 scop Exp $  # $FreeBSD: projects/cvsweb/cvsweb.cgi,v 1.138 2002/11/24 18:03:21 scop Exp $
 # $Id$  # $Id$
 # $Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.84 2001/10/07 20:50:10 knu Exp $  # $Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.84 2001/10/07 20:50:10 knu Exp $
 # $Platon: scripts/cgi/cvsweb/cvsweb.cgi,v 1.13 2002/11/22 20:04:15 rajo Exp $  # $Platon: scripts/cgi/cvsweb/cvsweb.cgi,v 1.14 2002/11/22 20:22:23 rajo Exp $
 #  #
 ###  ###
   
 require 5.000;  require 5.005_03;
   
 use strict;  use strict;
   
Line 87  use vars qw (
Line 87  use vars qw (
   $use_moddate $has_zlib $gzip_open    $use_moddate $has_zlib $gzip_open
   $allow_tar @tar_options @gzip_options @zip_options @cvs_options    $allow_tar @tar_options @gzip_options @zip_options @cvs_options
   @annotate_options $LOG_FILESEPARATOR $LOG_REVSEPARATOR    @annotate_options $LOG_FILESEPARATOR $LOG_REVSEPARATOR
   $tmpdir $HTML_DOCTYPE $HTML_META $cssurl    $tmpdir $HTML_DOCTYPE $HTML_META $cssurl $TempTemplate
 );  );
   
 # TODO:  # TODO:
 #   Maybe "use filetest 'access'" on perl >= 5.6 for better -X checks.  #   Maybe "use filetest 'access'" on perl >= 5.6 for better -X checks.
 #($] >= 5.006) and eval "use filetest 'access'";  #($] >= 5.006) and eval "use filetest 'access'";
   
 use Cwd qw(abs_path);  use Cwd            qw(abs_path);
 use File::Basename ();  use File::Basename qw();
 use IO::Pipe ();  use File::Temp     qw(tempdir);
 use IPC::Open2 qw(open2);  use IO::Pipe       qw();
 use Time::Local ();  use IPC::Open2     qw(open2);
   use Time::Local    qw();
   
 # -----------------------------------------------------------------------------  # -----------------------------------------------------------------------------
   
Line 129  EOM
Line 130  EOM
   
   $tmpdir = $ENV{TMPDIR} || '/var/tmp';    $tmpdir = $ENV{TMPDIR} || '/var/tmp';
   
     $TempTemplate = '.cvsweb.XXXXXXXX';
   
   $LOG_FILESEPARATOR = qr/^={77}$/o;    $LOG_FILESEPARATOR = qr/^={77}$/o;
   $LOG_REVSEPARATOR  = qr/^-{28}$/o;    $LOG_REVSEPARATOR  = qr/^-{28}$/o;
 }  }
Line 562  if ($input{tarball}) {
Line 565  if ($input{tarball}) {
           _('You cannot download the top level directory.'));            _('You cannot download the top level directory.'));
   }    }
   
   my $tmpexportdir = "$tmpdir/.cvsweb.$$." . int(time);    my $tmpexportdir;
     eval {
   mkdir($tmpexportdir, 0700) or      local $SIG{__DIE__};
     fatal('500 Internal Error', _('Unable to make temporary directory: %s'), $!);      $tmpexportdir = tempdir($TempTemplate, DIR => $tmpdir, CLEANUP => 1);
     };
     if ($@) {
       fatal('500 Internal Error', _('Unable to make temporary directory: %s'), $@);
     }
   
   my @fatal;    my @fatal;
   
Line 601  if ($input{tarball}) {
Line 608  if ($input{tarball}) {
     }      }
   }    }
   
   system($CMD{rm}, '-rf', $tmpexportdir) if -d $tmpexportdir;    # File::Temp's CLEANUP will handle cleanup of the temp dir for us.
   
   &fatal(@fatal) if @fatal;    &fatal(@fatal) if @fatal;
   
Line 2223  sub getDirLogs($$@)
Line 2230  sub getDirLogs($$@)
   
   if ($. == 0) {    if ($. == 0) {
     fatal("500 Internal Error",      fatal("500 Internal Error",
       _('Failed to spawn GNU rlog on <em>"%s"</em>.  <p>Did you set the <b>$command_path</b> in your configuration file correctly ? (Currently "%s"'),            _('Failed to spawn GNU rlog on <em>"%s"</em>.<br><br>Did you set the <b><code>$command_path</code></b> in your configuration file correctly? (Currently: "<code>%s</code>")'),
       join (", ", @files), $command_path);        join (", ", @files), $command_path);
   }    }
   close($fh);    close($fh);

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top