Bug 272914 - Ark overwrites a file compressed if the file doesn't have a extension
Summary: Ark overwrites a file compressed if the file doesn't have a extension
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 2.16
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: Raphael Kubo da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-10 09:01 UTC by Alessandro Nakamuta
Modified: 2011-05-10 23:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.6.4
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Nakamuta 2011-05-10 09:01:12 UTC
Version:           2.16
OS:                Linux



Reproducible: Always

Steps to Reproduce:
Make a file without a extension. The text file without txt, e.g.
Secondary click on the file and choose Compress > Compress to...
Press save without change the name


Actual Results:  
The file is overwrited with the compressed archive, without the tar.gz extension.

Expected Results:  
Another file is created, with the tar.gz extension.
Comment 1 Raphael Kubo da Costa 2011-05-10 18:21:32 UTC
Confirmed, thanks for the report.
Comment 2 Raphael Kubo da Costa 2011-05-10 20:56:22 UTC
SVN commit 1231302 by rkcosta:

AddDialog: Confirm if the user wants to overwrite an existing file.

So far, if the user created an archive via "Compress To" (or any other way that
used AddDialog), an existing file with the same name would be overwritten
without any confirmation.

CCBUG: 272914


 M  +2 -1      adddialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1231302
Comment 3 Raphael Kubo da Costa 2011-05-10 20:57:06 UTC
SVN commit 1231303 by rkcosta:

AddDialog: Confirm if the user wants to overwrite an existing file.

So far, if the user created an archive via "Compress To" (or any other way that
used AddDialog), an existing file with the same name would be overwritten
without any confirmation.

Forwardport of r1231302.

CCBUG: 272914


 M  +2 -1      adddialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1231303
Comment 4 Raphael Kubo da Costa 2011-05-10 23:35:56 UTC
SVN commit 1231313 by rkcosta:

AddDialog: Add a default file extension to the file being created.

KFileDialog (actually, KFileWidget)'s does not append an extension to the
selected file when it already exists, which is always the case when a single
file is being compressed, as the default file name is the file's own name.

To work around this, we always add the main extension for the current mimetype
the file passed to setSelection().

BUG: 272914
FIXED-IN: 4.6.4


 M  +5 -1      adddialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1231313
Comment 5 Raphael Kubo da Costa 2011-05-10 23:36:49 UTC
SVN commit 1231314 by rkcosta:

AddDialog: Add a default file extension to the file being created.

KFileDialog (actually, KFileWidget)'s does not append an extension to the
selected file when it already exists, which is always the case when a single
file is being compressed, as the default file name is the file's own name.

To work around this, we always add the main extension for the current mimetype
the file passed to setSelection().

CCBUG: 272914


 M  +5 -1      adddialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1231314
Comment 6 Raphael Kubo da Costa 2011-05-10 23:39:52 UTC
SVN commit 1231315 by rkcosta:

Mention Ark bug 272914 for 4.6.4.

CCBUG: 272914


 M  +5 -1      changelog_branch_4_6.xml  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1231315