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

List:       kde-mac
Subject:    Re: Review Request 129729: [OS X] : don't risk deleting /Applications (!)
From:       René J.V. Bertin <rjvbertin () gmail ! com>
Date:       2017-01-08 20:12:05
Message-ID: 20170108201205.23051.47708 () mimi ! kde ! org
[Download RAW message or body]

--===============8059071874084651305==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit


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

(Updated Jan. 8, 2017, 9:12 p.m.)


Status
------

This change has been discarded.


Review request for KDE Software on Mac OS X and KDE Frameworks.


Repository: kservice


Description
-------

I noticed that kbuildsyscoca.cpp may delete \
`QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation)`, according \
to the comments if that location is empty, but in practice no check is made whether \
that's the case.

And that makes the tool very dangerous on Mac, where the native ApplicationsLocation \
is something very different.

This patch refuses to remove /Applications, and also checks if `appsDir` is indeed \
empty.


Diffs
-----

  src/sycoca/kbuildsycoca.cpp 5e63907 

Diff: https://git.reviewboard.kde.org/r/129729/diff/


Testing
-------

Works as intended (though I haven't tried to get it to fail, for some curious reason \
:))


Thanks,

René J.V. Bertin


--===============8059071874084651305==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




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



<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; \
border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  <tr>
  <td>
   <h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been \
discarded.</h1>  </td>
 </tr>
</table>
<br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Software on Mac OS X and KDE Frameworks.</div>
<div>By René J.V. Bertin.</div>


<p style="color: grey;"><i>Updated Jan. 8, 2017, 9:12 p.m.</i></p>









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


<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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I noticed that kbuildsyscoca.cpp may delete <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation)</code>, \
according to the comments if that location is empty, but in practice no check is made \
whether that's the case.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">And that makes the tool very dangerous \
on Mac, where the native ApplicationsLocation is something very different.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">This patch refuses to remove /Applications, and also checks if <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">appsDir</code> is indeed empty.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Works as intended (though I haven't tried to get it to \
fail, for some curious reason :))</p></pre>  </td>
 </tr>
</table>


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

 <li>src/sycoca/kbuildsycoca.cpp <span style="color: grey">(5e63907)</span></li>

</ul>

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






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



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


--===============8059071874084651305==--


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

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