diff --git a/fileseq_test.go b/fileseq_test.go index 7e67883..9fa4931 100644 --- a/fileseq_test.go +++ b/fileseq_test.go @@ -821,6 +821,7 @@ func TestFindSequencesInList(t *testing.T) { { Name: "ambiguous single files", Paths: []string{ + "/path/to/complex_name_15-14-56-14.ext", "/path/to/single/123", "/path/to/single/123.ext", "/path/to/single/file0001.ext", @@ -829,6 +830,7 @@ func TestFindSequencesInList(t *testing.T) { }, Opts: []FileOption{SingleFiles}, Expect: []string{ + "/path/to/complex_name_15-14-56-14@@@.ext", "/path/to/single/123@@@", "/path/to/single/123@@@.ext", "/path/to/single/file1#.ext", @@ -839,6 +841,7 @@ func TestFindSequencesInList(t *testing.T) { { Name: "ambiguous single files disabled", Paths: []string{ + "/path/to/complex_name_15-14-56-14.ext", "/path/to/single/123", "/path/to/single/123.ext", "/path/to/single/file0001.ext", @@ -846,6 +849,7 @@ func TestFindSequencesInList(t *testing.T) { "/path/to/single/file.ext12345z", }, Expect: []string{ + "/path/to/complex_name_15-14-56-14@@@.ext", "/path/to/single/123@@@.ext", "/path/to/single/file1#.ext", }, diff --git a/sequence.go b/sequence.go index aee9143..b12149e 100644 --- a/sequence.go +++ b/sequence.go @@ -800,9 +800,17 @@ func findSequencesInList(paths []*fileItem, opts ...FileOption) (FileSequences, if err != nil { return err } - if pad == "" { + + // Always use the previously parsed basename, range, and ext + fs.basename = baseName + fs.ext = ext + if frange == "" { fs.SetFrameSet(nil) + fs.SetPadding("") + } else { + fs.SetFrameRange(frange) } + fseqs = append(fseqs, fs) buf.Reset()