Review Request: Plasmate:void ProjectManager::removeDirectory works correctly

Aaron J. Seigo aseigo at kde.org
Wed Jul 13 19:25:07 CEST 2011


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


there is a problem with the cd(".."),otherwise it looks good. just need to fix that up and it can go in.


projectmanager/projectmanager.cpp
<http://git.reviewboard.kde.org/r/101550/#comment4132>

    this cd("..") does not look safe. it assumes that it is a project created by plasmate, and so has the code one level beneath the actual project dir.
    
    however, one can easily import an existing project from disk. say .. ~/myPreexistingProject. which means this could would delete everything in my home dir!
    
    i actually have some projects imported from kdeexamples as well as one from a local git repo, and this would wreck havoc on my data :/
    
    as nasty as this is going to look, i think what will be required is to check if projectLocation is in appdata or not.


- Aaron J.


On July 13, 2011, 3 p.m., Giorgos Tsiapaliwkas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101550/
> -----------------------------------------------------------
> 
> (Updated July 13, 2011, 3 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> Hello,
> 
> the method removeDirectory wasn't removing the parent folder. 
> For example,if we named out plasmoid my_plasmoid it would have a directory like this "$(kde4-config --localprefix)/share/apps/plasmate/my_plasmoid/my_plasmoid" and the after calling the removeDirectory(before the patch) method we would have a directory like this:
> ""$(kde4-config --localprefix)/share/apps/plasmate/my_plasmoid/NOTES".
> With the patch the entire folder my_plasmoid is being deleted.
> 
> 
> Diffs
> -----
> 
>   projectmanager/projectmanager.h 53ef226 
>   projectmanager/projectmanager.cpp 122e48d 
> 
> Diff: http://git.reviewboard.kde.org/r/101550/diff
> 
> 
> Testing
> -------
> 
> compiles without issues and without regressions.
> 
> 
> Thanks,
> 
> Giorgos
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20110713/c4ba38a0/attachment.htm 


More information about the Plasma-devel mailing list