From: Rob H. <for...@us...> - 2001-11-26 23:33:19
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv10409/bin Modified Files: sandweb.cgi Log Message: fixed a couple bugs in the file subroutine of sandweb.cgi, it was not passing the correct path to File->new(), and also did an "unless" instead of an "if" when checking to see if we were dealing with a binary file ( if so, a warning is issued when you view/edit the file ). Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.75 retrieving revision 1.76 diff -U2 -r1.75 -r1.76 --- sandweb.cgi 2001/11/26 18:14:23 1.75 +++ sandweb.cgi 2001/11/26 23:33:16 1.76 @@ -337,5 +337,5 @@ my $file = SandWeb::File->new( 'filename' => $filename, - 'location' => "$users_dir/$username/$location", + 'location' => "$users_dir/$username", ); if ( $command eq 'info' ) { @@ -360,5 +360,6 @@ } } - unless ( $file->get_file_type() eq "Binary" ) { + + if ( "$file->get_file_type()" eq "Binary" ) { set_error("This does not appear to be a text file."); } |