Skip to content

Commit

Permalink
Merge branch 'seq' into test_edit
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Sep 27, 2023
2 parents 5cf8e8d + c6120c5 commit 6aa27b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/tlCore/FileInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ namespace tl

void FileInfo::sequence(const FileInfo& value)
{
const bool hasNumber = !_path.getNumber().empty();
math::IntRange sequence = _path.getSequence();
const math::IntRange& otherSequence = value.getPath().getSequence();
sequence.expand(otherSequence.getMin());
sequence.expand(otherSequence.getMax());
_path.setSequence(sequence);
if (hasNumber)
_path.setSequence(sequence);
_size += value._size;
_permissions = std::min(_permissions, value._permissions);
_time = std::max(_time, value._time);
Expand Down
4 changes: 3 additions & 1 deletion lib/tlTimeline/TimelineCreate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,9 @@ namespace tl
list.end(),
[path](const file::FileInfo& value)
{
return value.getPath().sequence(path);
const auto& vpath = value.getPath();
return vpath.sequence(path) &&
vpath.isSequence();
});
if (i != list.end())
{
Expand Down

0 comments on commit 6aa27b9

Please sign in to comment.