Review Request 124147: Create Data Dir If it Does Not Exist

David Faure faure at kde.org
Thu Jul 2 09:47:21 UTC 2015


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



src/ioslaves/http/kcookiejar/kcookieserver.cpp (line 50)
<https://git.reviewboard.kde.org/r/124147/#comment56301>

    then it's misnamed? :-)



src/ioslaves/http/kcookiejar/kcookieserver.cpp (line 51)
<https://git.reviewboard.kde.org/r/124147/#comment56302>

    static



src/ioslaves/http/kcookiejar/kcookieserver.cpp (line 61)
<https://git.reviewboard.kde.org/r/124147/#comment56305>

    This would be worth a qWarning about a permission problem when trying to remove the file.



src/ioslaves/http/kcookiejar/kcookieserver.cpp (line 68)
<https://git.reviewboard.kde.org/r/124147/#comment56306>

    This would be worth a qWarning too.
    
    And then I would still return a non-null string, so the rest of the code can (try to) keep going.
    
    No point in giving up because of a permission problem; I would warn and keep going with the filename, to give a chance to the user to fix the permission problem and not have to reboot.



src/ioslaves/http/kcookiejar/kcookieserver.cpp (line 113)
<https://git.reviewboard.kde.org/r/124147/#comment56304>

    So how about changing the static function to actually return the filename? Then it can also ensure it's not null.



src/ioslaves/http/kcookiejar/kcookieserver.cpp (line 116)
<https://git.reviewboard.kde.org/r/124147/#comment56303>

    ROTFL, ok, this code could be removed by now
    (kfm was KDE1 - and that file was surely not where QStandardPaths is looking) :-)


- David Faure


On June 22, 2015, 12:27 a.m., David Narváez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124147/
> -----------------------------------------------------------
> 
> (Updated June 22, 2015, 12:27 a.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> Prevents a cold start bug when the data dir is not created. Also, by
> storing the file name as a member of the KCookieServer class we avoid
> calculating it every time cookies are saved.
> 
> 
> Diffs
> -----
> 
>   src/ioslaves/http/kcookiejar/kcookieserver.h f61c7d0e4da58b805565632cf3dd484445c21275 
>   src/ioslaves/http/kcookiejar/kcookieserver.cpp ac585a0b04637c485647564d18a89a75d6c11d97 
> 
> Diff: https://git.reviewboard.kde.org/r/124147/diff/
> 
> 
> Testing
> -------
> 
> Restarted kded5 with no file named kcookiejar inside ~/.local/share and with a regular file named kcookiejar in that location.
> 
> 
> Thanks,
> 
> David Narváez
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150702/0b26be95/attachment.html>


More information about the Kde-frameworks-devel mailing list