django-cms / django-filer

File and Image Management Application for django
https://django-filer.readthedocs.io/
Other
1.73k stars 574 forks source link

fix: import_files command to skip existing files #1420

Closed misli closed 5 months ago

misli commented 9 months ago

Description

The import_files command tries to skip existing files, but it always create new one, because the way it detects the existing one is wrong.

Related resources

Checklist

codecov[bot] commented 9 months ago

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (dbeda3a) 75.22% compared to head (cba2715) 75.09%. Report is 16 commits behind head on master.

Files Patch % Lines
filer/management/commands/import_files.py 0.00% 8 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1420 +/- ## ========================================== - Coverage 75.22% 75.09% -0.14% ========================================== Files 75 75 Lines 3455 3461 +6 Branches 555 555 ========================================== Hits 2599 2599 - Misses 691 697 +6 Partials 165 165 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fsbraun commented 9 months ago

Hi @misli ! Thank you for the pull request.

Can you elaborate on the issue? Why are existing files detected wrongly?

From the code I see, you allow to have multiple files with the same name in the same folder but then ignore all of them but the first. To me it is not immediately transparent why this should be the right way to go. But then again, I have not fully understood the issue.

stale[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 months ago

This will now be closed due to inactivity, but feel free to reopen it.