Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DocumentFileExtensions.kt: Use simple string operations to preserve e…
…xtension when renaming MimeTypeMap's getExtensionFromMimeType() and getMimeTypeFromExtension() are not consistent with each other. Querying the extension for `audio/mp4` returns `m4a` as expected, but querying the MIME type for `m4a` returns `audio/mpeg`, which is associated with the `mp3` extension. Due to this, whenever an output file needed to be renamed, files that originally had the `m4a` extension would get changed to `mp3`. This commit fixes the issue by removing the whole extension -> MIME type -> extension round trip when renaming files. Instead, it just appends everything after the last dot from the original filename when renaming. Fixes: #292 Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
- Loading branch information