<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/103412/">http://git.reviewboard.kde.org/r/103412/</a>
     </td>
    </tr>
   </table>
   <br />









<div>




<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/103412/diff/2/?file=43530#file43530line342" style="color: black; font-weight: bold; text-decoration: underline;">kio/kio/copyjob.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

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

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

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void CopyJobPrivate::slotResultStating( KJob *job )</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">342</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">mp</span> <span class="o">&&</span> <span class="o">!</span><span class="n">mp</span><span class="o">-></span><span class="n">probablySlow</span><span class="p">())</span> <span class="c1">//</span><span class="cs">TODO</span><span class="c1"> actually preliminary check is even more valuable for slow NFS mounts</span></pre></td>
  </tr>

  <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">343</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span class="n">m_freeSpace</span> <span class="o">=</span> <span class="n">KDiskFreeSpaceInfo</span><span class="o">::</span><span class="n">freeSpaceInfo</span><span class="p">(</span> <span class="n">path</span> <span class="p">).</span><span class="n">available</span><span class="p">();</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Please use KFileSystemType instead of KMountPoint, it will be much faster.

And yeah, given that copying to NFS will be slow anyway, I'm not sure if using KDiskFreeSpaceInfo is really a problem...</pre>
</div>
<br />



<p>- David</p>


<br />
<p>On December 16th, 2011, 1:28 p.m., Nick Shaforostoff 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 kdelibs.</div>
<div>By Nick Shaforostoff.</div>


<p style="color: grey;"><i>Updated Dec. 16, 2011, 1:28 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;">this is simple fix for 243160. It gets free space info for the dst partition, then after each successful file copy it decreases an internally kept m_freeSpace value.

this will help us avoid situations when user copies a 4gb long file onto his disk, then finds out it has not enough space available.

i hope that i correctly understood kio copy job mechanism and done error reporting right.

TODO (from what was asked in the bug):
*checking for single file size limit on vfat.
*if the total size is larger than free space, warn user beforehand immediately
(right now it does the copying until it finds that the next file cannot be copied completely)
both these require new dialogs with user visible strings and are subject to be added after 4.8.


also as a bonus i changed m_overwriteList to be qset instead of qlist to make lookup operations faster.
</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;">files get copied fine. if i copy a bunch of files including one big file
(created with dd if=/dev/zero of=file.out bs=1MB count=300), then the copying process stops when it gets to this big file (i have small disk on my virtual machine, only 400 mb free)</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=243160">243160</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>kio/kio/copyjob.cpp <span style="color: grey">(eff7825)</span></li>

</ul>

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




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








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