<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>68399</bug_id>
          
          <creation_ts>2003-11-17 00:24:44 +0000</creation_ts>
          <short_desc>No check for print file names given by the rename dialog</short_desc>
          <delta_ts>2008-12-31 13:23:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kdeprint</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>59796</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>grave</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Friedrich W. H. Kossebau">kossebau</reporter>
          <assigned_to name="Michael Goffioul">kdeprint_bugs</assigned_to>
          <cc>jlayt</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>177279</commentid>
    <comment_count>0</comment_count>
    <who name="Friedrich W. H. Kossebau">kossebau</who>
    <bug_when>2003-11-17 00:24:45 +0000</bug_when>
    <thetext>Version:            (using KDE Devel)
Installed from:    Compiled sources

Problem: 
There is no check whether the filename returned from RenameDlg is 
already existing when &quot;Rename&quot; was selected.

Reproduce:
1. Create some files in your home dir: 
 $ touch print.ps; touch print_1.ps; touch print_2.ps
2. Open a file in Kate and reach for the printing dialog
3. Select &quot;print to file&quot;: default is ~/print.ps
4. Click &quot;Ok&quot;
5. Smart printer dialog detects there already is such a file 
   and calls for the RenameDlg.
6. Click &quot;Suggest&quot; button and get a new name proposed: &quot;print_1.ps&quot;
7. Click &quot;Rename&quot; which is now activated.
8. Lucky you. Get your existing &quot;print_1.ps&quot; overwritten, without any warning.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>177280</commentid>
    <comment_count>1</comment_count>
      <attachid>3252</attachid>
    <who name="Friedrich W. H. Kossebau">kossebau</who>
    <bug_when>2003-11-17 00:28:26 +0000</bug_when>
    <thetext>Created attachment 3252
This works for me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181473</commentid>
    <comment_count>2</comment_count>
    <who name="Friedrich W. H. Kossebau">kossebau</who>
    <bug_when>2003-11-29 23:00:47 +0000</bug_when>
    <thetext>Due, this works for me was meant for the patch.

And as there is a possible loss of data (overwritten files) the bug should be marked grave surely.

Please, anyone to review that really simple patch?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>205540</commentid>
    <comment_count>3</comment_count>
    <who name="Stephan Binner">binner</who>
    <bug_when>2004-02-13 21:45:30 +0000</bug_when>
    <thetext>The patch looks fine. Why didn&apos;t you apply it already?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>205661</commentid>
    <comment_count>4</comment_count>
    <who name="Friedrich W. H. Kossebau">kossebau</who>
    <bug_when>2004-02-14 12:05:26 +0000</bug_when>
    <thetext>Because I felt unsure if I understood the code around correctly. I sent the 
patch to kde-devel (okay, should perhaps have been kde-core-devel) and 
kde-print for review but got no reaction. So I put it here to rest until 
finally someone comes along. 

What should have I done else? :)

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206201</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Goffioul">kdeprint_bugs</who>
    <bug_when>2004-02-16 10:36:25 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 59796 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206203</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Goffioul">kdeprint_bugs</who>
    <bug_when>2004-02-16 10:36:31 +0000</bug_when>
    <thetext>The patch is OK, however a more generic solution has been implemented
at KIO::RenameDlg level (see revision 1.71 of kdelibs/kio/kio/renamedlg.cpp).
This should solve the problem. I&apos;ll close the bug.

(sorry for not taking your previous posts into consideration, I
remember it but it looks like I lost it and unfortunately forgot
about it)

Michael.

&gt; ------- Additional Comments From friedrich w h kossebau de  
&gt; 2004-02-14 12:05 -------
&gt; Because I felt unsure if I understood the code around 
&gt; correctly. I sent the 
&gt; patch to kde-devel (okay, should perhaps have been 
&gt; kde-core-devel) and 
&gt; kde-print for review but got no reaction. So I put it here to 
&gt; rest until 
&gt; finally someone comes along. 
&gt; 
&gt; What should have I done else? :)
&gt; 
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206255</commentid>
    <comment_count>7</comment_count>
    <who name="Friedrich W. H. Kossebau">kossebau</who>
    <bug_when>2004-02-16 12:45:43 +0000</bug_when>
    <thetext>&gt; ------- Additional Comments From goffioul imec be  2004-02-16 10:36 -------
&gt; The patch is OK, however a more generic solution has been implemented
&gt; at KIO::RenameDlg level (see revision 1.71 of
&gt; kdelibs/kio/kio/renamedlg.cpp). This should solve the problem. I&apos;ll close
&gt; the bug.

The fix at KIO::RenameDlg level fixes only half of the problem. Change my 
example to a manually inserted new name. This one should be checked for 
existance, too, until &quot;Overwrite&quot; was explicitly choosen.

So IMO the patch still should be applied. And pleased backported.

Friedrich

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206263</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Goffioul">kdeprint_bugs</who>
    <bug_when>2004-02-16 13:02:54 +0000</bug_when>
    <thetext>Then please commit it, if possible.

Michael.

&gt; The fix at KIO::RenameDlg level fixes only half of the 
&gt; problem. Change my 
&gt; example to a manually inserted new name. This one should be 
&gt; checked for 
&gt; existance, too, until &quot;Overwrite&quot; was explicitly choosen.
&gt; 
&gt; So IMO the patch still should be applied. And pleased backported.
&gt; 
&gt; Friedrich
&gt; 
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206318</commentid>
    <comment_count>9</comment_count>
    <who name="Friedrich W. H. Kossebau">kossebau</who>
    <bug_when>2004-02-16 15:34:58 +0000</bug_when>
    <thetext>&gt; ------- Additional Comments From goffioul imec be  2004-02-16 13:02 -------
&gt; Then please commit it, if possible.

Sorry, could you or someone else do it, my cvs copy is broken ATM and a 
recompile takes a day on my 233 MHz computer (and is not planned for the next 
few weeks, due to exams) :/ 

Friedrich

PS: And after having once again a look at the code of 
KPrintDialog::checkOutputFile() I think that most of this functionality 
should be in KIO itself anyway (and needs a way to prevent file name race 
conditions). But I haven&apos;t the time to care for.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>689948</commentid>
    <comment_count>10</comment_count>
    <who name="John Layt">jlayt</who>
    <bug_when>2008-12-31 13:23:50 +0000</bug_when>
    <thetext>Closing old Resolved status bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>3252</attachid>
            <date>2003-11-17 00:28:26 +0000</date>
            <delta_ts>2003-11-17 00:28:26 +0000</delta_ts>
            <desc>This works for me.</desc>
            <filename>kprintdialog-15.11.03.patch</filename>
            <type>text/plain</type>
            <size>1015</size>
            <attacher name="Friedrich W. H. Kossebau">kossebau</attacher>
            
              <data encoding="base64">SW5kZXg6IGtwcmludGRpYWxvZy5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2hvbWUva2RlL2tk
ZWxpYnMva2RlcHJpbnQva3ByaW50ZGlhbG9nLmNwcCx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS43
MwpkaWZmIC11IC0zIC1wIC1yMS43MyBrcHJpbnRkaWFsb2cuY3BwCi0tLSBrcHJpbnRkaWFsb2cu
Y3BwCTI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