Skip to content

Commit

Permalink
Merge pull request #5122 from noha/fix-nextVersion-for-basenames
Browse files Browse the repository at this point in the history
Backport - Fix nextVersion for cases where an entry with basename only exists in…
  • Loading branch information
MarcusDenker authored Nov 20, 2019
2 parents a39728a + 795385e commit 1d40ea7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/FileSystem-Core/FileReference.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ FileReference >> nextVersion [
parent := self parent.
nameWithoutExtension := self basename copyUpTo: $..

versionNumbers := parent children
"Check for filenames with the assumption it consists at least of basename and a single dot"
versionNumbers := (parent childrenMatching: nameWithoutExtension, '.*')
select: [ :f|
(f basename beginsWith: nameWithoutExtension) ]
thenCollect: [ :f|
Expand Down

0 comments on commit 1d40ea7

Please sign in to comment.