Skip to content

Commit

Permalink
Item15186: make auto-attach feature more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Mar 2, 2023
1 parent 4da8f80 commit d5d5b87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RCSStoreContrib/lib/Foswiki/Store/Rcs/Handler.pm
Expand Up @@ -1396,7 +1396,7 @@ sub synchroniseAttachmentsList {

foreach my $file ( keys %filesListedInPub ) {
if ( $filesListedInMeta{$file}
&& $filesListedInMeta{$file}{date} !=
&& $filesListedInMeta{$file}{date} <
$filesListedInPub{$file}{date} )
{
# File timestamp of existing file has changed.
Expand Down
6 changes: 3 additions & 3 deletions RCSStoreContrib/test/unit/RCSStoreContrib/AutoAttachTests.pm
Expand Up @@ -154,7 +154,7 @@ sub verify_autoattach {
$this->assert_not_null( $bfileAttributes,
'bfile.txt is missing file attributes' );
$this->assert_null( $bfileAttributes->{autoattached},
'bfile.txt shoud NOT be an autoattachment' );
'bfile.txt shoud NOT be an auto-attached' );

# visibledirectory not autoattached.:
my $visdirAttr = $meta->get( 'FILEATTACHMENT', "visibledirectory" );
Expand Down Expand Up @@ -187,12 +187,12 @@ sub verify_autoattach {
'afile.txt incorrectly auto-attached'
);

# Assert bfile.txt exists, and has changed to an autoattachment
# Assert bfile.txt exists, and has changed to an auto-attached
$bfileAttributes = $meta->get( 'FILEATTACHMENT', "bfile.txt" );
$this->assert_not_null( $bfileAttributes,
'bfile.txt is missing file attributes' );
$this->assert( $bfileAttributes->{autoattached},
'bfile.txt shoud now be an autoattachment' );
'bfile.txt shoud now be an auto-attached' );

# Our added files now exist:
my $sneakedfile1Attributes =
Expand Down

0 comments on commit d5d5b87

Please sign in to comment.