From: Peter T. <pet...@us...> - 2003-01-30 06:57:59
|
Update of /cvsroot/twiki/twiki/lib/TWiki/Store In directory sc8-pr-cvs1:/tmp/cvs-serv14652/TWiki/Store Modified Files: RcsFile.pm Log Message: Fix warning message during file upload, fix for Codev.SaveAttachmentBroken Index: RcsFile.pm =================================================================== RCS file: /cvsroot/twiki/twiki/lib/TWiki/Store/RcsFile.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** RcsFile.pm 5 Jan 2003 01:53:57 -0000 1.9 --- RcsFile.pm 30 Jan 2003 06:57:56 -0000 1.10 *************** *** 378,385 **** sub isAsciiDefault { ! my( $self, $filename ) = @_; ! ! my $attachAsciiPath = $self->{attachAsciiPath}; if( $filename =~ /$attachAsciiPath/ ) { return "ascii"; --- 378,386 ---- sub isAsciiDefault { ! my( $self ) = @_; + my $attachAsciiPath = $self->{"attachAsciiPath"}; + my $filename = $self->{"attachment"}; + if( $filename =~ /$attachAsciiPath/ ) { return "ascii"; *************** *** 419,423 **** $userName = $TWiki::userName if( ! $userName ); - warn( "can't lock an attachment" ) if( $self->{attachment} ); my $lockFilename = $self->_makeFileName( ".lock" ); --- 420,423 ---- *************** *** 529,534 **** my $dataDir = $self->{"dataDir"}; my $pubDir = $self->{"pubDir"}; ! ! if( ! $self->{"attachment"} ) { if( ! $extension ) { $extension = ".txt"; --- 529,543 ---- my $dataDir = $self->{"dataDir"}; my $pubDir = $self->{"pubDir"}; ! ! if( $extension eq ".lock" ) { ! $file = "$dataDir/$web/$topic$extension"; ! ! } elsif( $attachment ) { ! if ( $extension eq ",v" && $self->{"useRcsDir"} && -d "$dataDir/$web/RCS" ) { ! $extra = "/RCS"; ! } ! $file = "$pubDir/$web/$topic$extra/$attachment$extension"; ! ! } else { if( ! $extension ) { $extension = ".txt"; *************** *** 542,551 **** } $file = "$dataDir/$web$extra/$topic$extension"; - } else { - if ( $extension eq ",v" && $self->{"useRcsDir"} && -d "$dataDir/$web/RCS" ) { - $extra = "/RCS"; - } - - $file = "$pubDir/$web/$topic$extra/$attachment$extension"; } --- 551,554 ---- |