<table><tr><td style="">ahmadsamir updated this revision to Diff 65486.<br />ahmadsamir retitled this revision from "[CopyJob] Fix crash when copying all files is skipped for an already existing dir" to "[CopyJob] Fix crash when copying an already existing dir and pressing "Skip"".<br />ahmadsamir edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-3xxkd4l3wkebe4d/">(Show Details)</a><br />ahmadsamir edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-mxapbcrpfsfjnzy/">(Show Details)</a><br />ahmadsamir added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D23708">View Revision</a></tr></table><br /><div><div><p>Add a unit test<br />
Move the comments to the unit test</p></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div>return end() iterator, accessing the element <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">latter denotes lead</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">it denotes will cause<br />
a segmentation fault. Make sure the iterator is valid if it's changed<br />
inside the while loop, if we're going to use it before control reache</span>s<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">to a crash; guard against that possibility</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">the loop condition.<br />
<br />
Add a unit test</span>.<div style="padding: 8px 0;">...</div></div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div> should finish as expected<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
<br />
All unit tests passed (except kiocore-kacltest, but that's unrelated).</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D23708?vs=65336&id=65486">https://phabricator.kde.org/D23708?vs=65336&id=65486</a></div></div><br /><div><strong>BRANCH</strong><div><div>ahmad/copyjob (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23708">https://phabricator.kde.org/D23708</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/jobtest.cpp<br />
autotests/jobtest.h<br />
src/core/copyjob.cpp</div></div></div><br /><div><strong>To: </strong>ahmadsamir, Frameworks, dfaure<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns<br /></div>