Fix wrong attachment removal #16915

Merged
lunny merged 2 commits from fix-wrong-attachment-removal into main 2021-09-01 21:53:30 +00:00
Contributor

Fix bug: https://github.com/go-gitea/gitea/issues/16749

The legacy code is ..... well, I can not understand why the old code looks like that, but he logic is wrong. It uses "file.name" as dictionary's key. If the attachment files are all the same name (eg: pasted images all have the same name "image.png"), then the logic is wrong.

Need more test.

Fix bug: https://github.com/go-gitea/gitea/issues/16749 The legacy code is ..... well, I can not understand why the old code looks like that, but he logic is wrong. It uses "file.name" as dictionary's key. If the attachment files are all the same name (eg: pasted images all have the same name "image.png"), then the logic is wrong. Need more test.
zeripath approved these changes 2021-09-01 18:54:03 +00:00
6543 (Migrated from github.com) approved these changes 2021-09-01 21:53:14 +00:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#16915
No description provided.