[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-29 1:58:48
Message-ID: 20120329015848.9443.16088 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104417/
-----------------------------------------------------------
(Updated March 29, 2012, 1:58 a.m.)
Review request for KDE Runtime and Plasma.
Changes
-------
QFileInfo does not work with urls like "file:///path/to/file", we must use \
"/path/to/file".
Only urls with scheme "file" can be moved now.
Owning a folder and not having permission to write to it is a bit suspecious, so \
let's allow kio show the "permission denied dialog" when trying to move a file/folder \
in such situation.
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 (updated)
-----
service/jobs/nepomuk/Move.h 8a8afd1
service/jobs/nepomuk/Move.cpp 08a3cc2
Diff: http://git.reviewboard.kde.org/r/104417/diff/
Testing
-------
Works on Meego devel image. The file is copied and no error message is shown.
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 />
<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 29, 2012, 1:58 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">QFileInfo does not work with urls like "file:///path/to/file", \
we must use "/path/to/file".
Only urls with scheme "file" can be moved now.
Owning a folder and not having permission to write to it is a bit suspecious, so \
let's allow kio show the "permission denied dialog" when trying to move \
a file/folder in such situation. </pre>
</td>
</tr>
</table>
<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'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.</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 on Meego devel image. The file is copied and no error message is \
shown.</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> \
(updated)</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">(08a3cc2)</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