]> source.dussan.org Git - gitea.git/commit
When dumping trim the standard suffices instead of a random suffix (#19440) (#19447)
author6543 <6543@obermui.de>
Wed, 20 Apr 2022 22:26:03 +0000 (00:26 +0200)
committerGitHub <noreply@github.com>
Wed, 20 Apr 2022 22:26:03 +0000 (23:26 +0100)
commitc5fe0a096d0ba7b04dcc13ffb154a3fd55fca36b
treec36c1ccc1df28a47ffb0a3a2b0b936ba39ded7ef
parent0c7bf6801f240c2831f7dffdaa34a22a0344da0b
When dumping trim the standard suffices instead of a random suffix (#19440) (#19447)

* When dumping trim the standard suffices instead of a random suffix

Instead of using the `path.Ext()` to trim the last "extension" suffix, just iterate
through the supported suffices and trim those.

Fix #19424

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix enum with to have correct supported types only

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
cmd/dump.go