Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findSequencesInList drops a result when using same basenames with and without frame placeholder #135

Closed
justinfx opened this issue Oct 30, 2024 · 2 comments
Assignees
Labels

Comments

@justinfx
Copy link
Owner

Given the following:

>>> findSequencesInList(['file02.txt', 'file.txt'])
[<FileSequence: 'file2@@.txt'>]

The result drops the single "file.txt" because it has a similar basename to "file02" without a frame placeholder. We would expect to see 2 different sequences:

[<FileSequence: 'file2@@.txt'>, <FileSequence: 'file.txt'>]
@justinfx justinfx added the bug label Oct 30, 2024
@justinfx justinfx self-assigned this Oct 30, 2024
justinfx added a commit that referenced this issue Oct 30, 2024
…e to prevent name collision with same basename using frames (refs #135)
@justinfx
Copy link
Owner Author

The problem occurs because there is a key collision when it builds up a list of frames, between "file02.ext" and "file.ext". Once "file02.txt" establishes the key and adds its frame value, "file.ext" is discarded because it does not provide a frame.
The fix is to make the key more unique to differentiate between paths WITH and WITHOUT frames. This allows "file.ext" to be treated as a different single frame sequence.

@justinfx
Copy link
Owner Author

I've verified that this is not an issue in https://github.com/justinfx/gofileseq

justinfx added a commit that referenced this issue Nov 4, 2024
…ith no frame to prevent name collision with same basename using frames (refs #135)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant