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
main
Maria Khrustaleva 5 years ago committed by GitHub
parent 5e2a9e35e3
commit f2d0b71b72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Django templates for email and user guide (<https://github.com/openvinotoolkit/cvat/pull/2412>) - Django templates for email and user guide (<https://github.com/openvinotoolkit/cvat/pull/2412>)
- Saving relative paths in dummy chunks instead of absolute(<https://github.com/openvinotoolkit/cvat/pull/2424>)
### Security ### Security

@ -354,7 +354,7 @@ def _create_thread(tid, data):
img_sizes = [] img_sizes = []
with open(db_data.get_dummy_chunk_path(chunk_number), 'w') as dummy_chunk: with open(db_data.get_dummy_chunk_path(chunk_number), 'w') as dummy_chunk:
for path, frame_id in chunk_paths: 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)) img_sizes.append(extractor.get_image_size(frame_id))
db_images.extend([ db_images.extend([

Loading…
Cancel
Save