From f2d0b71b7247b11e0a2c8d62190abce8acc44246 Mon Sep 17 00:00:00 2001 From: Maria Khrustaleva Date: Sat, 14 Nov 2020 09:37:11 +0300 Subject: [PATCH] Fixed saving of relative paths in dummy chunks instead of absolute (#2424) * Fixed saving of relative paths in dummy chunks instead of absolute * Updated CHANGELOG --- CHANGELOG.md | 1 + cvat/apps/engine/task.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb9c68ec..23f3fa16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Django templates for email and user guide () +- Saving relative paths in dummy chunks instead of absolute() ### Security diff --git a/cvat/apps/engine/task.py b/cvat/apps/engine/task.py index e724d242..ca3a88d4 100644 --- a/cvat/apps/engine/task.py +++ b/cvat/apps/engine/task.py @@ -354,7 +354,7 @@ def _create_thread(tid, data): img_sizes = [] with open(db_data.get_dummy_chunk_path(chunk_number), 'w') as dummy_chunk: for path, frame_id in chunk_paths: - dummy_chunk.write(path + '\n') + dummy_chunk.write(os.path.relpath(path, upload_dir) + '\n') img_sizes.append(extractor.get_image_size(frame_id)) db_images.extend([