1
0
Fork 0

[add_sorting_to_archiving] Add natural sorting to ArchivableFilesFinder.

pull/10274/head
func0der 2021-11-10 15:23:39 +01:00
parent b09a39f9c8
commit a48afcd790
2 changed files with 15 additions and 14 deletions

View File

@ -84,7 +84,8 @@ class ArchivableFilesFinder extends \FilterIterator
->in($sources)
->filter($filter)
->ignoreVCS(true)
->ignoreDotFiles(false);
->ignoreDotFiles(false)
->sortByName(true);
parent::__construct($this->finder->getIterator());
}

View File

@ -48,36 +48,36 @@ class ArchivableFilesFinderTest extends TestCase
'A/prefixD.foo',
'A/prefixE.foo',
'A/prefixF.foo',
'B/sub/prefixA.foo',
'B/sub/prefixB.foo',
'B/sub/prefixC.foo',
'B/sub/prefixD.foo',
'B/sub/prefixE.foo',
'B/sub/prefixF.foo',
'C/prefixA.foo',
'C/prefixB.foo',
'C/prefixC.foo',
'C/prefixD.foo',
'C/prefixE.foo',
'C/prefixF.foo',
'D/prefixA',
'D/prefixB',
'D/prefixC',
'D/prefixD',
'D/prefixE',
'D/prefixF',
'B/sub/prefixA.foo',
'B/sub/prefixB.foo',
'B/sub/prefixC.foo',
'B/sub/prefixD.foo',
'B/sub/prefixE.foo',
'B/sub/prefixF.foo',
'E/subtestA.foo',
'F/subtestA.foo',
'G/subtestA.foo',
'H/subtestA.foo',
'D/prefixD',
'D/prefixA',
'D/prefixB',
'D/prefixC',
'D/prefixE',
'D/prefixF',
'I/J/subtestA.foo',
'K/dirJ/subtestA.foo',
'toplevelA.foo',
'toplevelB.foo',
'prefixA.foo',
'prefixB.foo',
'prefixC.foo',
'prefixD.foo',
'K/dirJ/subtestA.foo',
'prefixE.foo',
'prefixF.foo',
'parameters.yml',