Deleting a map over the admin page does not delete the underlying files
Bug #1751244 reported by
kaputtnik
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Widelands Website |
Fix Released
|
Medium
|
kaputtnik |
Bug Description
While working on an other branch i found some bad things:
1. Deleting a map does not removes the underlying files(minimap and mapfile). This is not really problematic since uploading a new file with the same mapname works. But after trying to solve this i found:
2. The column minimap stores a faulty path to the minimap. The problem is here that the path begins with a slash: Trying to use os.path.join fails here because paths beginning with a slash are treated as absolute path and concatenating a base path with the image path fails. It fails because the base path will be omitted when the image path is treated as absolute path (begins with a slash).
Related branches
lp:~widelands-dev/widelands-website/move_maps_minimap
- kaputtnik (community): Needs Resubmitting
- GunChleoc: Approve
-
Diff: 247 lines (+124/-22)7 files modifiedwlmaps/admin.py (+13/-1)
wlmaps/forms.py (+15/-6)
wlmaps/migrations/0003_auto_20190712_0928.py (+65/-0)
wlmaps/models.py (+16/-1)
wlmaps/templates/wlmaps/index.html (+3/-7)
wlmaps/templates/wlmaps/inlines/version_info.html (+11/-0)
wlmaps/templates/wlmaps/map_detail.html (+1/-7)
summary: |
- Deleting a map over the admin page does not delete the underlying file + Deleting a map over the admin page does not delete the underlying files |
Changed in widelands-website: | |
status: | Confirmed → Fix Released |
To post a comment you must log in.