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

Fix the problem with duplicated frames in case of "share" #735

Merged
merged 2 commits into from
Sep 25, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix a case when the code works incorrectly
/a/b/c
/a/b/c0

Previously only /a/b/c will be in output but should be both.
  • Loading branch information
Nikita Manovich committed Sep 25, 2019
commit 265011035f51871b851385952df157e4c9574674
3 changes: 2 additions & 1 deletion cvat/apps/engine/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ def _validate_data(data):
# following order: 'a/b/c/d/2.txt', 'a/b/c/d/1.txt', 'a/b/c/d', 'a/b/c'
# Let's keep all items which aren't substrings of the previous item. In
# the example above only 2.txt and 1.txt files will be in the final list.
# Also need to correctly handle 'a/b/c0', 'a/b/c' case.
data['server_files'] = [v[1] for v in zip([""] + server_files, server_files)
if not v[0].startswith(v[1])]
if not os.path.dirname(v[0]).startswith(v[1])]

def count_files(file_mapping, counter):
for rel_path, full_path in file_mapping.items():
Expand Down