Review Request 122897: Fix 7z zip not listing files after adding on new created archive.

Elvis Angelaccio elvis.angelaccio at kdemail.net
Fri Jan 15 11:50:53 UTC 2016



> On March 17, 2015, 9:58 a.m., Raphael Kubo da Costa wrote:
> > Thanks a lot for the patch and sorry for being absent.
> > Does this mean Ark is currently unable to add/remove files from 7z archives, or is it that the file list is not updated after that is done? Are you using the new p7zip (9.38.1)?
> 
> Giuseppe Silletti wrote:
>     It is that the file list is not updated after adding a file. I'm using the last version of p7zip.
> 
> Raphael Kubo da Costa wrote:
>     I've just tried Ark here (latest `master`) with p7zip 9.38.1. I had an archive with a single file in it. I was able to add two new files and remove them, and the file list was updated correctly.
>     Can you file a bug report and attach a file and some steps showing I could reproduce the issue you are having?
> 
> Giuseppe Silletti wrote:
>     Have you tried to create a new 7zip archive and then add a file? If the archive already exists it works properly.
> 
> Raphael Kubo da Costa wrote:
>     I did now: call `ark` without arguments -> Ctrl+N -> type something like "foo.7z" and add/remove files. Everything still worked.
> 
> Giuseppe Silletti wrote:
>     Ok, please let's try a last thing following these steps:
>     1)Create a new archive from the New label
>     2)Write a name for the file like "foo", without adding the extension like you did before
>     3)Choose the 7zip format from the list that appears
>     4)Now try to add some files, it shouldn't work.
> 
> Raphael Kubo da Costa wrote:
>     Right, I could finally reproduce it after following your instructions, thank you.
>     
>     Your patch actually breaks the standard case, as it always appends the extension to the archive name: if I create a new file called `foo.7z`, it will actually be called `foo.7z.7z`.
>     
>     The underlying issue here is that some command-line programs (`zip`, `rar` and `7z`, but not `lha`) always append an extension to the archive name when it's being created if one is not specified. Since we cannot change this behavior, we have to either tell the user about this or try to handle it transparently. I'm tending to favor the former, and ask the user if it's OK to actually add an extension to the file being created (and cancel everything if the user does not want it), or just inform the user that the file name had to be changed.

> 1)Create a new archive from the New label
> 
> 2)Write a name for the file like "foo", without adding the extension like you did before
> 
> 3)Choose the 7zip format from the list that appears
> 
> 4)Now try to add some files, it shouldn't work.

This has changed since Ark 15.12. You either check the "Automatically select filename extension" checkbox in the dialog, or an error message is displayed to the user.

For this reason, please discard this review request.


- Elvis


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


On March 10, 2015, 10:17 p.m., Giuseppe Silletti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122897/
> -----------------------------------------------------------
> 
> (Updated March 10, 2015, 10:17 p.m.)
> 
> 
> Review request for KDE Utils and Raphael Kubo da Costa.
> 
> 
> Repository: ark
> 
> 
> Description
> -------
> 
> Ark doesn't access to a new 7z archive properly. I've made the substituteListVariables function in cliinterface.cpp virtual, and then added it in 7z cliplugin.cpp. In this file i've overridden  substituteListVariables, and then i've appended the .7z extension to the filename() function. So now ark can find the right path of 7z archives.
> 
> 
> Diffs
> -----
> 
>   kerfuffle/cliinterface.h b4d79ed 
>   plugins/cli7zplugin/cliplugin.h 9f122e4 
>   plugins/cli7zplugin/cliplugin.cpp 500f121 
> 
> Diff: https://git.reviewboard.kde.org/r/122897/diff/
> 
> 
> Testing
> -------
> 
> I've added some files in a new archive and it works.
> 
> 
> Thanks,
> 
> Giuseppe Silletti
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20160115/b78d8826/attachment-0001.html>


More information about the Kde-utils-devel mailing list