Drop extension only if present
ClosedPublic

Authored by elvisangelaccio on May 5 2016, 7:35 PM.

Details

Summary

Drop the extension only if present, by looking at mimetype detected-by-extension.
If the mime is not the default one, it means that the filename has a valid extension, which we want to drop.

Otherwise it's just a filename with some dots, we can use it as is.

BUG: 362690

Test Plan

Added a testcase to reproduce the bug.

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio retitled this revision from to Drop extension only if present.
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
elvisangelaccio set the repository for this revision to R36 Ark.
elvisangelaccio added a project: Ark.
elvisangelaccio added a subscriber: kde-utils-devel.
rthomsen accepted this revision.May 5 2016, 7:47 PM
rthomsen edited edge metadata.

Ship it! :)

This revision is now accepted and ready to land.May 5 2016, 7:47 PM
This revision was automatically updated to reflect the committed changes.