[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Review Request: Copy files instead of moving if parent dir is not writable
From:       "Lamarque Vieira Souza" <lamarque () kde ! org>
Date:       2012-03-30 21:16:36
Message-ID: 20120330211636.10957.14970 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On March 30, 2012, 8:18 p.m., Thomas Lübking wrote:
> > service/jobs/nepomuk/Move.cpp, line 352
> > <http://git.reviewboard.kde.org/r/104417/diff/5/?file=55320#file55320line352>
> > 
> > "!QUrl::isLocalFile()"?
> 
> Lamarque Vieira Souza wrote:
> isLocalFile() was introduced in Qt 4.8.0 and we still use Qt 4.7.4 in Meego image.
> 
> Thomas Lübking wrote:
> Qt doc bogus?
> http://qt-project.org/doc/qt-4.8/qurl.html#isLocalFile

Yes: http://qt-project.org/doc/note_revisions/137/234/view


- Lamarque Vieira


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


On March 30, 2012, 6:57 p.m., Lamarque Vieira Souza wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104417/
> -----------------------------------------------------------
> 
> (Updated March 30, 2012, 6:57 p.m.)
> 
> 
> Review request for KDE Runtime and Plasma.
> 
> 
> Description
> -------
> 
> When adding an application resource to a private activity kactivitymanager tries to \
> move the resource's .desktop file to the activity's private folder. The new \
> .desktop file is created successfully but the source file is not deleted if the \
> user does not have write permission on the file's directory. This patch detects \
> such situation and uses copy instead of move to prevent "permission denied" \
> messages for every resource being added. 
> 
> This addresses bug 296808.
> http://bugs.kde.org/show_bug.cgi?id=296808
> 
> 
> Diffs
> -----
> 
> service/jobs/nepomuk/Move.h 8a8afd1 
> service/jobs/nepomuk/Move.cpp 2248768 
> 
> Diff: http://git.reviewboard.kde.org/r/104417/diff/
> 
> 
> Testing
> -------
> 
> Works for resources of type "app", it does not work for "image" yet because \
> Move::canMove receives the nepomuk's uri instead of the file url when the resource \
> type is "image". 
> 
> Thanks,
> 
> Lamarque Vieira Souza
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/104417/">http://git.reviewboard.kde.org/r/104417/</a>
  </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On March 30th, 2012, 8:18 p.m., <b>Thomas \
Lübking</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="http://git.reviewboard.kde.org/r/104417/diff/5/?file=55320#file55320line352" \
style="color: black; font-weight: bold; text-decoration: \
underline;">service/jobs/nepomuk/Move.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>  <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">bool Move::canMove(const QUrl &amp; source)</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">352</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="k">if</span> <span class="p">(</span><span class="n">source</span><span \
class="p">.</span><span class="n">scheme</span><span class="p">()</span> <span \
class="o">!=</span> <span class="n">QLatin1String</span><span class="p">(</span><span \
class="s">&quot;file&quot;</span><span class="p">))</span> <span \
class="p">{</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">&quot;!QUrl::isLocalFile()&quot;?</pre>  </blockquote>



 <p>On March 30th, 2012, 8:40 p.m., <b>Lamarque Vieira Souza</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">isLocalFile() was \
introduced in Qt 4.8.0 and we still use Qt 4.7.4 in Meego image.</pre>  </blockquote>





 <p>On March 30th, 2012, 8:45 p.m., <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Qt doc bogus? \
http://qt-project.org/doc/qt-4.8/qurl.html#isLocalFile</pre>  </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes: \
http://qt-project.org/doc/note_revisions/137/234/view</pre> <br />




<p>- Lamarque Vieira</p>


<br />
<p>On March 30th, 2012, 6:57 p.m., Lamarque Vieira Souza wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for KDE Runtime and Plasma.</div>
<div>By Lamarque Vieira Souza.</div>


<p style="color: grey;"><i>Updated March 30, 2012, 6:57 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">When adding an application resource to a private activity \
kactivitymanager tries to move the resource&#39;s .desktop file to the activity&#39;s \
private folder. The new .desktop file is created successfully but the source file is \
not deleted if the user does not have write permission on the file&#39;s directory. \
This patch detects such situation and uses copy instead of move to prevent \
&quot;permission denied&quot; messages for every resource being added.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Works for resources of type &quot;app&quot;, it does not work for \
&quot;image&quot; yet because Move::canMove receives the nepomuk&#39;s uri instead of \
the file url when the resource type is &quot;image&quot;.</pre>  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=296808">296808</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>service/jobs/nepomuk/Move.h <span style="color: grey">(8a8afd1)</span></li>

 <li>service/jobs/nepomuk/Move.cpp <span style="color: grey">(2248768)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/104417/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic