--- Store.pm.orig 2003-08-09 01:16:21.000000000 -0600 +++ Store.pm 2004-07-26 17:25:46.000000000 -0600 @@ -328,12 +328,12 @@ # ========================= -# rdiff: $text = &TWiki::Store::getRevisionDiff( $webName, $topic, "1.$r2", "1.$r1" ); +# rdiff: $text = &TWiki::Store::getRevisionDiff( $webName, $topic, $attachment, "1.$r2", "1.$r1" ); sub getRevisionDiff { - my( $web, $topic, $rev1, $rev2 ) = @_; + my( $web, $topic, $attachment, $rev1, $rev2 ) = @_; - my $rcs = _getTopicHandler( $web, $topic ); + my $rcs = _getTopicHandler( $web, $topic, $attachment ); my $r1 = substr( $rev1, 2 ); my $r2 = substr( $rev2, 2 ); my( $error, $diff ) = $rcs->revisionDiff( $r1, $r2 ); @@ -744,11 +744,17 @@ # ========================= sub topicExists { - my( $theWeb, $theTopic ) = @_; + my( $theWeb, $theTopic, $theFile ) = @_; ( $theWeb, $theTopic ) = normalizeWebTopicName( $theWeb, $theTopic ); - return -e "$TWiki::dataDir/$theWeb/$theTopic.txt"; + + if ( $theFile eq "" ) { + return -e "$TWiki::dataDir/$theWeb/$theTopic.txt"; + } else { + return -e "$TWiki::pubDir/$theWeb/$theTopic/$theFile"; + } } + # ========================= # Try and get from meta information in topic, if this can't be done then use RCS # Note there is no "1." prefix to this data