Item13101: moveTopic requires existing topic even when only handling attachments

pencil
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release:
Applies To: Extension
Component: PlainFileStoreContrib
Branches:
Reported By: JulianLevens
Waiting For:
Last Change By: JulianLevens
When developing VersatileStore I inherited PlainFileStore to let it handle attachments. However, I found a nit in moveTopic and needed to tweak one-line of code or this mixin Store would fail.

sub moveTopic {
    my ( $this, $oldTopicObject, $newTopicObject, $cUID ) = @_;

    _saveDamage($oldTopicObject);

    my @revs;
    my $rev = _numRevisions( \@revs, $oldTopicObject );

-   _moveFile( _latestFile($oldTopicObject), _latestFile($newTopicObject) );
+   _moveFile( _latestFile($oldTopicObject), _latestFile($newTopicObject) )
+       if -e _latestFile($oldTopicObject);
    _moveFile( _historyDir($oldTopicObject), _historyDir($newTopicObject) );
    my $pub = _getPub($oldTopicObject);
    if ( -e $pub ) {
        _moveFile( $pub, _getPub($newTopicObject) );
    }

-- JulianLevens - 17 Nov 2014

 

ItemTemplate edit

Summary moveTopic requires existing topic even when only handling attachments
ReportedBy JulianLevens
Codebase trunk
SVN Range
AppliesTo Extension
Component PlainFileStoreContrib
Priority Normal
CurrentState Confirmed
WaitingFor
Checkins
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r1 - 17 Nov 2014, JulianLevens
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy