D13315: Detect mime type of local files based on their contents

Miklós Máté noreply at phabricator.kde.org
Mon Jun 4 21:26:37 UTC 2018


miklosm added inline comments.

INLINE COMMENTS

> broulik wrote in kfileitem.cpp:730
> That and also (broken) NFS mounts. We have that in quite a few places where seemingly innocent local files can freeze the entire UI, so I'd rather not introduce another place where this may happen.

> FUSE appears as local urls and it's slow.

People still use FUSE?? If the connection is lost, it sends all processes trying to access that volume into uninterruptable sleep.

> seemingly innocent local files can freeze the entire UI

KFileItem::determineMimeType() promises proper mime type detection, and that can only be achieved by reading into the file. I agree that potentially long operations should be performed in a background thread, but the KFileItem API doesn't allow such a change, so it's the responsibility of the callers of this method.

BTW the currentMimeType() method shouldn't do any detection. It's very misleading, and when there are multiple candidates, choosing the first one on the list is not "accurate" or "real determination".

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D13315

To: miklosm, #frameworks, dfaure
Cc: broulik, ngraham, apol, kde-frameworks-devel, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180604/41c12264/attachment.html>


More information about the Kde-frameworks-devel mailing list