[NTG-context] wrong patch

Hans Hagen ntg-context@ntg.nl
Tue Jun 1 20:19:19 CEST 2004


Hi,

The previous post was wrong; I was playing with write tests recently and 
send an old fragment; the right one is:

sub RunFiles {
my $currentpath = cwd() ;
# test if current path is writable
if (! -w "$currentpath") {
     print " current path readonly : $currentpath\n";
     if ($ENV["TEMP"] && -e $ENV["TEMP"]) {
         $RunPath = $ENV["TEMP"] ;
     } elsif ($ENV["TMP"] && -e $ENV["TMP"]) {
         $RunPath = $ENV["TMP"] ;
     }
}
# test if we need to change paths
if (($RunPath ne "") && (-w "$RunPath")) {
     print "      changing to path : $RunPath\n";
     $InpPath = $currentpath ;
     chdir ($RunPath) ;
}
# start working
     if ($PdfArrange) {


Hans


-------------------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE/POD/CTS
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------




More information about the ntg-context mailing list