Review Request: Append ".desktop" to generated link files to prevent them from being identified as something else

David Faure faure at kde.org
Wed Jan 18 15:30:30 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103691/#review9921
-----------------------------------------------------------



kfile/knewfilemenu.cpp
<http://git.reviewboard.kde.org/r/103691/#comment8202>

    Ah, the file doesn't exist yet, so this mimetype detection is based on the filename only, so a file without any extension, which would have worked (from the contents), will get a .desktop appended for nothing.
    
    I think this should rather be
    findByNameAndContent(chosenFileName, content)
    where content is a QByteArray with the header of a desktop file ("[Desktop Entry]\n").


- David Faure


On Jan. 13, 2012, 7:10 p.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103691/
> -----------------------------------------------------------
> 
> (Updated Jan. 13, 2012, 7:10 p.m.)
> 
> 
> Review request for kdelibs and David Faure.
> 
> 
> Description
> -------
> 
> The attached patch prevents a user generated link file, e.g. link to URL location, from being identified as something else. For examples, see the bug reported linked to this review request.
> 
> 
> This addresses bug 224142.
>     http://bugs.kde.org/show_bug.cgi?id=224142
> 
> 
> Diffs
> -----
> 
>   kfile/knewfilemenu.cpp fbb0e48 
> 
> Diff: http://git.reviewboard.kde.org/r/103691/diff/diff
> 
> 
> Testing
> -------
> 
> Generate a link file to a URL location and see what KDE identifies the file as.
> 
> 
> Thanks,
> 
> Dawit Alemayehu
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120118/e03402ac/attachment.htm>


More information about the kde-core-devel mailing list