Review Request 124442: Improve detection of mimetype

Ragnar Thomsen rthomsen6 at gmail.com
Sun Jul 26 10:21:41 UTC 2015



> On July 25, 2015, 6:34 p.m., Elvis Angelaccio wrote:
> > kerfuffle/archive_kerfuffle.cpp, line 55
> > <https://git.reviewboard.kde.org/r/124442/diff/1/?file=387120#file387120line55>
> >
> >     Another problem I just discovered: this breaks the mimetype detection when creating a new archive. It looks like you can discard this one without affecting the patch.
> 
> Ragnar Thomsen wrote:
>     How does it "break" the detection? In the CreateDialog, when I type an extension the filter switches to the correct mimetype...

Ah yes, I can see it now. After pressing save...


- Ragnar


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124442/#review82952
-----------------------------------------------------------


On July 23, 2015, 11:18 p.m., Ragnar Thomsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124442/
> -----------------------------------------------------------
> 
> (Updated July 23, 2015, 11:18 p.m.)
> 
> 
> Review request for KDE Utils, Elvis Angelaccio and Raphael Kubo da Costa.
> 
> 
> Bugs: 265971
>     http://bugs.kde.org/show_bug.cgi?id=265971
> 
> 
> Repository: ark
> 
> 
> Description
> -------
> 
> This patch improves the mimetype detection when opening archives. Previously, the filename extension had higher priority than file content when determining mimetype. When opening an archive that had a wrong extension (as in bug 265971), this resulted in Ark failing to open it.
> 
> With this patch the mimetype is determined from file content. Additionally, a warning is shown in console output when mimetype from extension and content do not match.
> 
> 
> Diffs
> -----
> 
>   kerfuffle/archive_kerfuffle.cpp 7b9990d 
> 
> Diff: https://git.reviewboard.kde.org/r/124442/diff/
> 
> 
> Testing
> -------
> 
> Opening archives with wrong filename extensions now works as expected.
> 
> 
> Thanks,
> 
> Ragnar Thomsen
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20150726/bc847fb4/attachment.html>


More information about the Kde-utils-devel mailing list