After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768645 - Redesign the API and logic of compression and decompression
Redesign the API and logic of compression and decompression
Status: RESOLVED FIXED
Product: gnome-autoar
Classification: Other
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Autoar maintainer(s)
GNOME Autoar maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-07-11 06:58 UTC by Razvan Chitu
Modified: 2016-08-22 18:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
AutoarExtract: refactor pathname building process (14.11 KB, patch)
2016-07-11 07:04 UTC, Razvan Chitu
none Details | Review
AutoarExtract: refactor destination decision process (18.91 KB, patch)
2016-07-11 07:04 UTC, Razvan Chitu
none Details | Review
AutoarExtract: add signal for name conflicts (10.39 KB, patch)
2016-07-11 07:04 UTC, Razvan Chitu
none Details | Review
Add tests for the extract operation (50.51 KB, patch)
2016-07-11 07:04 UTC, Razvan Chitu
none Details | Review
AutoarExtract: remove support for memory files (17.74 KB, patch)
2016-08-19 17:24 UTC, Razvan Chitu
none Details | Review
AutoarExtract: restrict object initalization to use GFile (14.35 KB, patch)
2016-08-19 17:24 UTC, Razvan Chitu
none Details | Review
AutoarExtract: remove pattern checking (9.26 KB, patch)
2016-08-19 17:24 UTC, Razvan Chitu
none Details | Review
AutoarExtract: refactor pathname building process (13.71 KB, patch)
2016-08-19 17:24 UTC, Razvan Chitu
none Details | Review
AutoarExtract: refactor destination decision process (20.20 KB, patch)
2016-08-19 17:24 UTC, Razvan Chitu
none Details | Review
AutoarExtract: add signal for name conflicts (10.47 KB, patch)
2016-08-19 17:24 UTC, Razvan Chitu
none Details | Review
AutoarExtract: remove AutoarPref member (11.97 KB, patch)
2016-08-19 17:24 UTC, Razvan Chitu
none Details | Review
AutoarExtract: make the type final (49.29 KB, patch)
2016-08-19 17:24 UTC, Razvan Chitu
none Details | Review
Add tests for the extract operation (44.90 KB, patch)
2016-08-19 17:25 UTC, Razvan Chitu
none Details | Review
AutoarCreate: report correct size for non-regular files (1.61 KB, patch)
2016-08-19 17:25 UTC, Razvan Chitu
none Details | Review
AutoarCreate: refactor object initialization (21.04 KB, patch)
2016-08-19 17:25 UTC, Razvan Chitu
none Details | Review
AutoarCreate: remove AutoarPref member (12.12 KB, patch)
2016-08-19 17:25 UTC, Razvan Chitu
none Details | Review
AutoarCreate: add property for creating a top level directory (11.06 KB, patch)
2016-08-19 17:25 UTC, Razvan Chitu
none Details | Review
AutoarCreate: make the type final (50.23 KB, patch)
2016-08-19 17:25 UTC, Razvan Chitu
none Details | Review
AutoarExtract: rename to AutoarExtractor (108.52 KB, patch)
2016-08-19 17:25 UTC, Razvan Chitu
none Details | Review
AutoarCreate: rename to AutoarCompressor (126.86 KB, patch)
2016-08-19 17:25 UTC, Razvan Chitu
none Details | Review
general: add functions for checking if mime types are supported (6.47 KB, patch)
2016-08-19 17:25 UTC, Razvan Chitu
needs-work Details | Review
general: remove AutoarPref (36.62 KB, patch)
2016-08-19 17:26 UTC, Razvan Chitu
none Details | Review
general: use library name for the main header (3.41 KB, patch)
2016-08-19 17:26 UTC, Razvan Chitu
none Details | Review
AutoarExtractor: rename properties and functions (9.62 KB, patch)
2016-08-19 17:26 UTC, Razvan Chitu
none Details | Review
AutoarExtract: fix return value of getter function (867 bytes, patch)
2016-08-20 11:37 UTC, Razvan Chitu
none Details | Review
AutoarExtract: remove support for memory files (17.50 KB, patch)
2016-08-20 11:40 UTC, Razvan Chitu
none Details | Review
AutoarExtract: refactor pathname building process (13.80 KB, patch)
2016-08-20 12:17 UTC, Razvan Chitu
none Details | Review
AutoarExtract: refactor destination decision process (20.18 KB, patch)
2016-08-20 12:31 UTC, Razvan Chitu
none Details | Review
AutoarExtract: remove AutoarPref member (12.36 KB, patch)
2016-08-20 13:30 UTC, Razvan Chitu
none Details | Review
AutoarExtract: make the type final (49.43 KB, patch)
2016-08-20 13:55 UTC, Razvan Chitu
none Details | Review
AutoarExtract: fix return value of getter function (867 bytes, patch)
2016-08-20 15:36 UTC, Razvan Chitu
none Details | Review
AutoarExtract: remove support for memory files (17.50 KB, patch)
2016-08-20 15:36 UTC, Razvan Chitu
none Details | Review
AutoarExtract: restrict object initalization to use GFile (15.07 KB, patch)
2016-08-20 15:36 UTC, Razvan Chitu
none Details | Review
AutoarExtract: remove pattern checking (9.26 KB, patch)
2016-08-20 15:36 UTC, Razvan Chitu
none Details | Review
AutoarExtract: refactor pathname building process (13.80 KB, patch)
2016-08-20 15:36 UTC, Razvan Chitu
none Details | Review
AutoarExtract: refactor destination decision process (20.18 KB, patch)
2016-08-20 15:36 UTC, Razvan Chitu
none Details | Review
AutoarExtract: add signal for name conflicts (10.63 KB, patch)
2016-08-20 15:36 UTC, Razvan Chitu
none Details | Review
AutoarExtract: remove AutoarPref member (12.03 KB, patch)
2016-08-20 15:36 UTC, Razvan Chitu
none Details | Review
AutoarExtract: make the type final (49.54 KB, patch)
2016-08-20 15:37 UTC, Razvan Chitu
none Details | Review
Add tests for the extract operation (43.91 KB, patch)
2016-08-20 15:37 UTC, Razvan Chitu
none Details | Review
AutoarCreate: report correct size for non-regular files (1.61 KB, patch)
2016-08-20 15:37 UTC, Razvan Chitu
none Details | Review
AutoarCreate: refactor object initialization (21.04 KB, patch)
2016-08-20 15:37 UTC, Razvan Chitu
none Details | Review
AutoarCreate: remove AutoarPref member (12.12 KB, patch)
2016-08-20 15:37 UTC, Razvan Chitu
none Details | Review
AutoarCreate: add property for creating a top level directory (11.08 KB, patch)
2016-08-20 15:37 UTC, Razvan Chitu
none Details | Review
AutoarCreate: make the type final (49.70 KB, patch)
2016-08-20 15:37 UTC, Razvan Chitu
none Details | Review
AutoarExtract: rename to AutoarExtractor (108.53 KB, patch)
2016-08-20 15:37 UTC, Razvan Chitu
none Details | Review
AutoarCreate: rename to AutoarCompressor (122.70 KB, patch)
2016-08-20 15:37 UTC, Razvan Chitu
none Details | Review
general: add getter of supported mime types (6.49 KB, patch)
2016-08-20 15:38 UTC, Razvan Chitu
none Details | Review
general: remove AutoarPref (36.62 KB, patch)
2016-08-20 15:38 UTC, Razvan Chitu
none Details | Review
general: use library name for the main header (3.41 KB, patch)
2016-08-20 15:38 UTC, Razvan Chitu
none Details | Review
AutoarExtractor: rename properties and functions (9.22 KB, patch)
2016-08-20 15:38 UTC, Razvan Chitu
none Details | Review
AutoarCompressor: remove unused properties (6.28 KB, patch)
2016-08-20 15:38 UTC, Razvan Chitu
rejected Details | Review
AutoarExtract: restrict object initalization to use GFile (15.06 KB, patch)
2016-08-21 21:11 UTC, Razvan Chitu
none Details | Review
AutoarExtract: refactor destination decision process (20.25 KB, patch)
2016-08-21 21:11 UTC, Razvan Chitu
none Details | Review
AutoarExtract: add signal for name conflicts (10.85 KB, patch)
2016-08-21 21:12 UTC, Razvan Chitu
none Details | Review
Add tests for the extract operation (43.95 KB, patch)
2016-08-21 21:12 UTC, Razvan Chitu
none Details | Review
Add tests for the extract operation (44.01 KB, patch)
2016-08-21 21:15 UTC, Razvan Chitu
none Details | Review
Add tests for the extract operation (44.03 KB, patch)
2016-08-21 21:24 UTC, Razvan Chitu
none Details | Review
AutoarExtract: fix return value of getter function (867 bytes, patch)
2016-08-22 09:39 UTC, Razvan Chitu
committed Details | Review
AutoarExtract: remove support for memory files (17.50 KB, patch)
2016-08-22 09:40 UTC, Razvan Chitu
committed Details | Review
AutoarExtract: restrict object initalization to use GFile (15.06 KB, patch)
2016-08-22 09:40 UTC, Razvan Chitu
committed Details | Review
AutoarExtract: remove pattern checking (9.26 KB, patch)
2016-08-22 09:40 UTC, Razvan Chitu
committed Details | Review
AutoarExtract: refactor pathname building process (13.80 KB, patch)
2016-08-22 09:40 UTC, Razvan Chitu
committed Details | Review
AutoarExtract: refactor destination decision process (20.25 KB, patch)
2016-08-22 09:40 UTC, Razvan Chitu
committed Details | Review
AutoarExtract: add signal for name conflicts (10.85 KB, patch)
2016-08-22 09:40 UTC, Razvan Chitu
committed Details | Review
AutoarExtract: remove AutoarPref member (12.10 KB, patch)
2016-08-22 09:40 UTC, Razvan Chitu
committed Details | Review
AutoarExtract: make the type final (49.56 KB, patch)
2016-08-22 09:40 UTC, Razvan Chitu
committed Details | Review
Add tests for the extract operation (44.03 KB, patch)
2016-08-22 09:41 UTC, Razvan Chitu
committed Details | Review
AutoarCreate: report correct size for non-regular files (1.61 KB, patch)
2016-08-22 09:41 UTC, Razvan Chitu
committed Details | Review
AutoarCreate: refactor object initialization (21.04 KB, patch)
2016-08-22 09:41 UTC, Razvan Chitu
committed Details | Review
AutoarCreate: remove AutoarPref member (12.12 KB, patch)
2016-08-22 09:41 UTC, Razvan Chitu
committed Details | Review
AutoarCreate: add property for creating a top level directory (11.08 KB, patch)
2016-08-22 09:41 UTC, Razvan Chitu
committed Details | Review
AutoarCreate: make the type final (49.70 KB, patch)
2016-08-22 09:41 UTC, Razvan Chitu
committed Details | Review
AutoarExtract: rename to AutoarExtractor (109.01 KB, patch)
2016-08-22 09:41 UTC, Razvan Chitu
committed Details | Review
AutoarCreate: rename to AutoarCompressor (122.70 KB, patch)
2016-08-22 09:41 UTC, Razvan Chitu
committed Details | Review
general: add getter of supported mime types (6.49 KB, patch)
2016-08-22 09:42 UTC, Razvan Chitu
committed Details | Review
general: remove AutoarPref (36.62 KB, patch)
2016-08-22 09:42 UTC, Razvan Chitu
committed Details | Review
general: use library name for the main header (3.41 KB, patch)
2016-08-22 09:42 UTC, Razvan Chitu
committed Details | Review
AutoarExtractor: rename properties and functions (9.22 KB, patch)
2016-08-22 09:42 UTC, Razvan Chitu
committed Details | Review

Description Razvan Chitu 2016-07-11 06:58:54 UTC
See patches.
Comment 1 Razvan Chitu 2016-07-11 07:04:04 UTC
Created attachment 331176 [details] [review]
AutoarExtract: refactor pathname building process

Previously, operations with pathnames obtained from libarchive were performed
directly on strings, without the use of the GFile API. This lead to an
increasing complexity of the code and also to oversights. Also, the process of
turning a path in the archive to a path on the file system had a complex logic.
It relied on multiple parameters that could have different meanings according to
some context elements, such as the number of files in an archive. One example is
the `top_level_dir` member, which could be a file if the archive had just one
element inside, or a directory in other situations.

In order to fix these issues, use the GFile API for path operations, like
finding a common prefix, path concatenation etc. For the logic part, make sure
that the top level directory is always a directory so the number of checks can
be reduced.
Comment 2 Razvan Chitu 2016-07-11 07:04:30 UTC
Created attachment 331177 [details] [review]
AutoarExtract: refactor destination decision process

Previously, the destination of an extraction could not be modified by the user
application once the AutoarExtract object was created. This leads to a big lack
of flexibility, because there are many cases when the destination depends on the
contents of the archive, unknown at object creation time.

In order to fix this, when the destination is notified to the user, also notify
the list of files in the archive and enable the user to set a new destination.
Comment 3 Razvan Chitu 2016-07-11 07:04:41 UTC
Created attachment 331178 [details] [review]
AutoarExtract: add signal for name conflicts

Extraction was previously done with overwrite as the default option for existing
files. A better solution would be to detect conflicts and notify the user
application, offering the possibility to change the destination of the extracted
file.

In order to fix this, add a signal for notifying conflicts. This signal gets
emitted before actually extracting a file.
Comment 4 Razvan Chitu 2016-07-11 07:04:54 UTC
Created attachment 331179 [details] [review]
Add tests for the extract operation
Comment 5 Razvan Chitu 2016-08-19 17:24:23 UTC
Created attachment 333644 [details] [review]
AutoarExtract: remove support for memory files

While libarchive offers support for archives read from memory, there is no use
case for this feature in gnome-autoar.
Comment 6 Razvan Chitu 2016-08-19 17:24:28 UTC
Created attachment 333645 [details] [review]
AutoarExtract: restrict object initalization to use GFile

In conformity with the GLib API, change AutoarExtract API to work with GFiles
instead of strings.
Comment 7 Razvan Chitu 2016-08-19 17:24:32 UTC
Created attachment 333646 [details] [review]
AutoarExtract: remove pattern checking

Filtering extracted files by pathname should not be the responsibility of the
AutoarExtract instances.
Comment 8 Razvan Chitu 2016-08-19 17:24:37 UTC
Created attachment 333647 [details] [review]
AutoarExtract: refactor pathname building process

Previously, operations with pathnames obtained from libarchive were performed
directly on strings, without the use of the GFile API. This lead to an
increasing complexity of the code and also to oversights. Also, the process of
turning a path in the archive to a path on the file system had a complex logic.
It relied on multiple parameters that could have different meanings according to
some context elements, such as the number of files in an archive. One example is
the `top_level_dir` member, which could be a file if the archive had just one
element inside, or a directory in other situations.

In order to fix these issues, use the GFile API for path operations, like
finding a common prefix, path concatenation etc. For the logic part, make sure
that the top level directory is always a directory so the number of checks can
be reduced.
Comment 9 Razvan Chitu 2016-08-19 17:24:43 UTC
Created attachment 333648 [details] [review]
AutoarExtract: refactor destination decision process

Previously, the destination of an extraction could not be modified by the user
application once the AutoarExtract object was created. This leads to a big lack
of flexibility, because there are many cases when the destination depends on the
contents of the archive, unknown at object creation time.

In order to fix this, when the destination is notified to the user, also notify
the list of files in the archive and enable the user to set a new destination.
Comment 10 Razvan Chitu 2016-08-19 17:24:48 UTC
Created attachment 333649 [details] [review]
AutoarExtract: add signal for name conflicts

Extraction was previously done with overwrite as the default option for existing
files. A better solution would be to detect conflicts and notify the user
application, offering the possibility to change the destination of the extracted
file.

In order to fix this, add a signal for notifying conflicts. This signal gets
emitted before actually extracting a file.
Comment 11 Razvan Chitu 2016-08-19 17:24:54 UTC
Created attachment 333650 [details] [review]
AutoarExtract: remove AutoarPref member

After removing pattern checking from AutoarExtract, the AutoarPref member was
only used for deleting the original archive if the operation succeeds. This
should be replaced with a boolean property in the AutoarExtract class.
Comment 12 Razvan Chitu 2016-08-19 17:24:59 UTC
Created attachment 333651 [details] [review]
AutoarExtract: make the type final

Since it is not expected to derive AutoarExtract now, make it a final type.
Comment 13 Razvan Chitu 2016-08-19 17:25:04 UTC
Created attachment 333652 [details] [review]
Add tests for the extract operation
Comment 14 Razvan Chitu 2016-08-19 17:25:10 UTC
Created attachment 333653 [details] [review]
AutoarCreate: report correct size for non-regular files

The size reported for non-regular files was the size in the archive and not the
size on the disk, which would lead to bad progress information. In order to fix
this, make sure that the size on the disk is the one reported.
Comment 15 Razvan Chitu 2016-08-19 17:25:15 UTC
Created attachment 333654 [details] [review]
AutoarCreate: refactor object initialization

Instead of using string or pointer arrays, use only GList with GFiles.
Comment 16 Razvan Chitu 2016-08-19 17:25:28 UTC
Created attachment 333655 [details] [review]
AutoarCreate: remove AutoarPref member

The AutoarPref object is only used for getting the compression format and
filter for the operation. Replace it with explicit format and filter properties
that are set on object construction.
Comment 17 Razvan Chitu 2016-08-19 17:25:33 UTC
Created attachment 333656 [details] [review]
AutoarCreate: add property for creating a top level directory

Previously, AutoarCreate would create a top level directory if more than one
files would be compressed. This leads to problems because clients cannot decide
whether they want a top level directory or not. In order to fix this, add a
property for creating a top level directory.
Comment 18 Razvan Chitu 2016-08-19 17:25:39 UTC
Created attachment 333657 [details] [review]
AutoarCreate: make the type final

Since it is not expected to derive AutoarCreate now, make it a final type.
Comment 19 Razvan Chitu 2016-08-19 17:25:44 UTC
Created attachment 333658 [details] [review]
AutoarExtract: rename to AutoarExtractor
Comment 20 Razvan Chitu 2016-08-19 17:25:50 UTC
Created attachment 333659 [details] [review]
AutoarCreate: rename to AutoarCompressor
Comment 21 Razvan Chitu 2016-08-19 17:25:54 UTC
Created attachment 333660 [details] [review]
general: add functions for checking if mime types are supported
Comment 22 Razvan Chitu 2016-08-19 17:26:00 UTC
Created attachment 333661 [details] [review]
general: remove AutoarPref

Since neither AutoarCreate or AutoarExtract use it anymore, AutoarPref can be
safely removed.
Comment 23 Razvan Chitu 2016-08-19 17:26:14 UTC
Created attachment 333662 [details] [review]
general: use library name for the main header

Since other libraries use the library name for their main header file,
gnome-autoar should do it too.
Comment 24 Razvan Chitu 2016-08-19 17:26:19 UTC
Created attachment 333663 [details] [review]
AutoarExtractor: rename properties and functions

The "files" and "size" properties of AutoarExtractor actually reflect the total
files and the total size within the archive, so they should be named properly.
Comment 25 Carlos Soriano 2016-08-19 17:50:50 UTC
Review of attachment 333644 [details] [review]:

LGTM

::: gnome-autoar/autoar-extract.c
@@ +413,3 @@
 {
   g_return_val_if_fail (AUTOAR_IS_EXTRACT (arextract), FALSE);
+  return arextract->priv->output_is_dest;

was this a mistake before? It looks obvious here
Comment 26 Carlos Soriano 2016-08-19 17:58:44 UTC
Review of attachment 333645 [details] [review]:

LGTM
Comment 27 Carlos Soriano 2016-08-19 18:04:06 UTC
Review of attachment 333646 [details] [review]:

Forgot to remove the .h unused API, but as said in IRC let's not add artificial work in something so young like autoar
Comment 28 Carlos Soriano 2016-08-19 19:00:23 UTC
Review of attachment 333647 [details] [review]:

The commit message already raises a red flag, it has an "and" in the last paragraph "use the GFile API for path operations AND For the logic part, make sure
that the top level directory is always a directory so the number of checks can be reduced."

However as said in the previous patch, let's not bikeshed on this... just keep it in mind for future.

::: gnome-autoar/autoar-extract.c
@@ +754,3 @@
+  prefix = g_object_ref (files->data);
+
+  GFile *file;

can this happen? is it only the case the root == prefix right? if that's the case, worth a comment
Comment 29 Carlos Soriano 2016-08-19 20:11:01 UTC
Review of attachment 333648 [details] [review]:

::: gnome-autoar/autoar-extract.c
@@ +830,3 @@
+  }
+
+  {

why this parenteses? if it's to keep the scope for g_autofree, it's going to be freed anyway after the function ends.

@@ +1565,2 @@
+static void
+autoar_extract_step_decide_dest (AutoarExtract *arextract)

decide_destination

@@ +1612,3 @@
   }
 
+  {

why these parenteses? if it is for the g_autofree, either use a different variable or use regular g_free. Parentesis here is kinda...ugly.
I cannot see it used anymore in the function, so not sure why they are needed.

@@ +1624,3 @@
+                                      &(priv->error));
+
+  }

and we do nothing??
Comment 30 Carlos Soriano 2016-08-19 20:22:30 UTC
Review of attachment 333649 [details] [review]:

::: gnome-autoar/autoar-extract.c
@@ +742,3 @@
+
+  if (*new_file) {
+

one per line?

@@ +879,3 @@
+  /* If there is no file with the given name, there will be no conflict */
+  if (file_type == G_FILE_TYPE_UNKNOWN) {
+  gboolean conflict = FALSE;

return FALSE, I think is more clear. We don't actually depend on any precondition here. All code paths result in FALSE.

@@ +1045,3 @@
   g_debug ("autoar_extract_do_write_entry: writing");
   r = 0;
+

I will forgive the spurious line changes, since I know it's for readability.

@@ +1799,3 @@
+        case AUTOAR_CONFLICT_OVERWRITE:
+          break;
+      AutoarConflictAction action;

what if the new name is conflict too? you should recheck until there is no conflict at all.
Comment 31 Carlos Soriano 2016-08-19 20:26:24 UTC
Review of attachment 333650 [details] [review]:

::: gnome-autoar/autoar-extract.c
@@ +1341,3 @@
+  g_object_class_install_property (object_class, PROP_DELETE_IF_SUCCEED,
+                                   g_param_spec_boolean ("delete-if-succeed",
+                                                         "Delete if succeeded",

succeed or succeeded? :)

::: tests/test-extract.c
@@ +106,3 @@
   source = g_file_new_for_commandline_arg (argv[1]);
   output = g_file_new_for_commandline_arg (argv[2]);
+  arextract = autoar_extract_new (source, output);

and set it to delete the source just to test no?
Comment 32 Carlos Soriano 2016-08-19 20:26:56 UTC
Review of attachment 333651 [details] [review]:

yeah!
Comment 33 Carlos Soriano 2016-08-19 21:34:07 UTC
Review of attachment 333652 [details] [review]:

::: gnome-autoar/autoar-create.c
@@ +1591,3 @@
     g_debug ("autoar_create_step_create: source[%d] (%s)", i, priv->source[i]);
     file = g_ptr_array_index (priv->source_file, i);
+    fileinfo = g_file_query_info (file, 

what's the change here?

::: tests/test-extract-unit.c
@@ +92,3 @@
+  ExtractTest *extract_test;
+  g_autoptr (GFile) workdir = NULL;
+  GFile *in;

don't abreviate

@@ +324,3 @@
+  found = FALSE;
+  while (!found && g_file_has_parent (tests_dir, NULL)) {
+    GFile *parent;

autoptr?

@@ +325,3 @@
+  while (!found && g_file_has_parent (tests_dir, NULL)) {
+    GFile *parent;
+    gchar *parent_basename;

autofree?
Comment 34 Carlos Soriano 2016-08-19 21:46:24 UTC
Review of attachment 333653 [details] [review]:

OK
Comment 35 Carlos Soriano 2016-08-19 21:50:05 UTC
Review of attachment 333654 [details] [review]:

oh yeah, thanks for this one
Comment 36 Carlos Soriano 2016-08-19 21:51:29 UTC
Review of attachment 333655 [details] [review]:

nice
Comment 37 Carlos Soriano 2016-08-19 21:53:35 UTC
Review of attachment 333656 [details] [review]:

::: gnome-autoar/autoar-create.c
@@ +90,3 @@
   int output_is_dest : 1;
 
+  gboolean started;

what?
Comment 38 Carlos Soriano 2016-08-19 21:54:26 UTC
Review of attachment 333657 [details] [review]:

we could have changed the arcreate variables to self, but it's fine.
Comment 39 Carlos Soriano 2016-08-19 21:55:08 UTC
Review of attachment 333658 [details] [review]:

yeah
Comment 40 Carlos Soriano 2016-08-19 21:55:10 UTC
Review of attachment 333658 [details] [review]:

yeah
Comment 41 Carlos Soriano 2016-08-19 21:55:41 UTC
Review of attachment 333659 [details] [review]:

+1
Comment 42 Carlos Soriano 2016-08-19 21:57:09 UTC
Review of attachment 333660 [details] [review]:

commit message title too long. How about "general: add getter of supported mime types"
Comment 43 Carlos Soriano 2016-08-19 21:58:05 UTC
Review of attachment 333660 [details] [review]:

::: gnome-autoar/autoar-mime-types.c
@@ +3,3 @@
+ * Functions for checking autoar support for various mime types
+ *
+ * Copyright (C) 2016  Razvan Chitu

it's good to provide your email as in the git commit.
Comment 44 Carlos Soriano 2016-08-19 21:58:57 UTC
Review of attachment 333661 [details] [review]:

+1
Comment 45 Carlos Soriano 2016-08-19 22:05:20 UTC
Review of attachment 333662 [details] [review]:

yeah
Comment 46 Carlos Soriano 2016-08-19 22:06:18 UTC
Review of attachment 333663 [details] [review]:

+1
Comment 47 Razvan Chitu 2016-08-19 22:49:22 UTC
(In reply to Carlos Soriano from comment #29)
> Review of attachment 333648 [details] [review] [review]:
> 
> ::: gnome-autoar/autoar-extract.c
> @@ +1624,3 @@
> +                                      &(priv->error));
> +
> +  }
> 
> and we do nothing??

Ugh, we discussed and rediscussed this part quite a lot. Didn't we agree that an existing destination directory is *not* a fatal error?
Comment 48 Razvan Chitu 2016-08-20 09:32:30 UTC
(In reply to Carlos Soriano from comment #33)
> Review of attachment 333652 [details] [review] [review]:
> 
> ::: tests/test-extract-unit.c
> @@ +324,3 @@
> +  found = FALSE;
> +  while (!found && g_file_has_parent (tests_dir, NULL)) {
> +    GFile *parent;
> 
> autoptr?

Can't autoptr that. At each iteration I unref the tests_dir, not the parent.
Comment 49 Razvan Chitu 2016-08-20 11:37:57 UTC
Created attachment 333734 [details] [review]
AutoarExtract: fix return value of getter function

autoar_extract_get_output_is_dest returned source_is_mem instead.
Comment 50 Razvan Chitu 2016-08-20 11:40:03 UTC
Created attachment 333735 [details] [review]
AutoarExtract: remove support for memory files

While libarchive offers support for archives read from memory, there is no use
case for this feature in gnome-autoar.
Comment 51 Razvan Chitu 2016-08-20 12:17:14 UTC
Created attachment 333736 [details] [review]
AutoarExtract: refactor pathname building process

Previously, operations with pathnames obtained from libarchive were performed
directly on strings, without the use of the GFile API. This lead to an
increasing complexity of the code and also to oversights. Also, the process of
turning a path in the archive to a path on the file system had a complex logic.
It relied on multiple parameters that could have different meanings according to
some context elements, such as the number of files in an archive. One example is
the `top_level_dir` member, which could be a file if the archive had just one
element inside, or a directory in other situations.

In order to fix these issues, use the GFile API for path operations, like
finding a common prefix, path concatenation etc. For the logic part, make sure
that the top level directory is always a directory so the number of checks can
be reduced.
Comment 52 Razvan Chitu 2016-08-20 12:18:31 UTC
(In reply to Carlos Soriano from comment #28)
> Review of attachment 333647 [details] [review] [review]:
> 
> The commit message already raises a red flag, it has an "and" in the last
> paragraph "use the GFile API for path operations AND For the logic part,
> make sure
> that the top level directory is always a directory so the number of checks
> can be reduced."
> 
> However as said in the previous patch, let's not bikeshed on this... just
> keep it in mind for future.
> 
> ::: gnome-autoar/autoar-extract.c
> @@ +754,3 @@
> +  prefix = g_object_ref (files->data);
> +
> +  GFile *file;
> 
> can this happen? is it only the case the root == prefix right? if that's the
> case, worth a comment

This can happen for malformed paths in the archive, like '../../image.png'. These will end up pointing outside of the archive.
Comment 53 Razvan Chitu 2016-08-20 12:31:48 UTC
Created attachment 333738 [details] [review]
AutoarExtract: refactor destination decision process

Previously, the destination of an extraction could not be modified by the user
application once the AutoarExtract object was created. This leads to a big lack
of flexibility, because there are many cases when the destination depends on the
contents of the archive, unknown at object creation time.

In order to fix this, when the destination is notified to the user, also notify
the list of files in the archive and enable the user to set a new destination.
Comment 54 Razvan Chitu 2016-08-20 13:30:59 UTC
Created attachment 333742 [details] [review]
AutoarExtract: remove AutoarPref member

After removing pattern checking from AutoarExtract, the AutoarPref member was
only used for deleting the original archive if the operation succeeds. This
should be replaced with a boolean property in the AutoarExtract class.
Comment 55 Razvan Chitu 2016-08-20 13:55:03 UTC
Created attachment 333743 [details] [review]
AutoarExtract: make the type final

Since it is not expected to derive AutoarExtract now, make it a final type.
Comment 56 Razvan Chitu 2016-08-20 15:36:16 UTC
Created attachment 333745 [details] [review]
AutoarExtract: fix return value of getter function

autoar_extract_get_output_is_dest returned source_is_mem instead.
Comment 57 Razvan Chitu 2016-08-20 15:36:22 UTC
Created attachment 333746 [details] [review]
AutoarExtract: remove support for memory files

While libarchive offers support for archives read from memory, there is no use
case for this feature in gnome-autoar.
Comment 58 Razvan Chitu 2016-08-20 15:36:29 UTC
Created attachment 333747 [details] [review]
AutoarExtract: restrict object initalization to use GFile

In conformity with the GLib API, change AutoarExtract API to work with GFiles
instead of strings.
Comment 59 Razvan Chitu 2016-08-20 15:36:34 UTC
Created attachment 333748 [details] [review]
AutoarExtract: remove pattern checking

Filtering extracted files by pathname should not be the responsibility of the
AutoarExtract instances.
Comment 60 Razvan Chitu 2016-08-20 15:36:40 UTC
Created attachment 333749 [details] [review]
AutoarExtract: refactor pathname building process

Previously, operations with pathnames obtained from libarchive were performed
directly on strings, without the use of the GFile API. This lead to an
increasing complexity of the code and also to oversights. Also, the process of
turning a path in the archive to a path on the file system had a complex logic.
It relied on multiple parameters that could have different meanings according to
some context elements, such as the number of files in an archive. One example is
the `top_level_dir` member, which could be a file if the archive had just one
element inside, or a directory in other situations.

In order to fix these issues, use the GFile API for path operations, like
finding a common prefix, path concatenation etc. For the logic part, make sure
that the top level directory is always a directory so the number of checks can
be reduced.
Comment 61 Razvan Chitu 2016-08-20 15:36:46 UTC
Created attachment 333750 [details] [review]
AutoarExtract: refactor destination decision process

Previously, the destination of an extraction could not be modified by the user
application once the AutoarExtract object was created. This leads to a big lack
of flexibility, because there are many cases when the destination depends on the
contents of the archive, unknown at object creation time.

In order to fix this, when the destination is notified to the user, also notify
the list of files in the archive and enable the user to set a new destination.
Comment 62 Razvan Chitu 2016-08-20 15:36:53 UTC
Created attachment 333751 [details] [review]
AutoarExtract: add signal for name conflicts

Extraction was previously done with overwrite as the default option for existing
files. A better solution would be to detect conflicts and notify the user
application, offering the possibility to change the destination of the extracted
file.

In order to fix this, add a signal for notifying conflicts. This signal gets
emitted before actually extracting a file.
Comment 63 Razvan Chitu 2016-08-20 15:36:58 UTC
Created attachment 333752 [details] [review]
AutoarExtract: remove AutoarPref member

After removing pattern checking from AutoarExtract, the AutoarPref member was
only used for deleting the original archive if the operation succeeds. This
should be replaced with a boolean property in the AutoarExtract class.
Comment 64 Razvan Chitu 2016-08-20 15:37:05 UTC
Created attachment 333753 [details] [review]
AutoarExtract: make the type final

Since it is not expected to derive AutoarExtract now, make it a final type.
Comment 65 Razvan Chitu 2016-08-20 15:37:11 UTC
Created attachment 333754 [details] [review]
Add tests for the extract operation
Comment 66 Razvan Chitu 2016-08-20 15:37:17 UTC
Created attachment 333755 [details] [review]
AutoarCreate: report correct size for non-regular files

The size reported for non-regular files was the size in the archive and not the
size on the disk, which would lead to bad progress information. In order to fix
this, make sure that the size on the disk is the one reported.
Comment 67 Razvan Chitu 2016-08-20 15:37:23 UTC
Created attachment 333756 [details] [review]
AutoarCreate: refactor object initialization

Instead of using string or pointer arrays, use only GList with GFiles.
Comment 68 Razvan Chitu 2016-08-20 15:37:29 UTC
Created attachment 333757 [details] [review]
AutoarCreate: remove AutoarPref member

The AutoarPref object is only used for getting the compression format and
filter for the operation. Replace it with explicit format and filter properties
that are set on object construction.
Comment 69 Razvan Chitu 2016-08-20 15:37:35 UTC
Created attachment 333758 [details] [review]
AutoarCreate: add property for creating a top level directory

Previously, AutoarCreate would create a top level directory if more than one
files would be compressed. This leads to problems because clients cannot decide
whether they want a top level directory or not. In order to fix this, add a
property for creating a top level directory.
Comment 70 Razvan Chitu 2016-08-20 15:37:41 UTC
Created attachment 333759 [details] [review]
AutoarCreate: make the type final

Since it is not expected to derive AutoarCreate now, make it a final type.
Comment 71 Razvan Chitu 2016-08-20 15:37:47 UTC
Created attachment 333760 [details] [review]
AutoarExtract: rename to AutoarExtractor
Comment 72 Razvan Chitu 2016-08-20 15:37:54 UTC
Created attachment 333761 [details] [review]
AutoarCreate: rename to AutoarCompressor
Comment 73 Razvan Chitu 2016-08-20 15:38:00 UTC
Created attachment 333762 [details] [review]
general: add getter of supported mime types
Comment 74 Razvan Chitu 2016-08-20 15:38:06 UTC
Created attachment 333763 [details] [review]
general: remove AutoarPref

Since neither AutoarCreate or AutoarExtract use it anymore, AutoarPref can be
safely removed.
Comment 75 Razvan Chitu 2016-08-20 15:38:12 UTC
Created attachment 333764 [details] [review]
general: use library name for the main header

Since other libraries use the library name for their main header file,
gnome-autoar should do it too.
Comment 76 Razvan Chitu 2016-08-20 15:38:18 UTC
Created attachment 333765 [details] [review]
AutoarExtractor: rename properties and functions

The "files" and "size" properties of AutoarExtractor actually reflect the total
files and the total size within the archive, so they should be named properly.
Comment 77 Razvan Chitu 2016-08-20 15:38:24 UTC
Created attachment 333766 [details] [review]
AutoarCompressor: remove unused properties

The "size" and "files" properties are not updated in the compression operation.
Therefore it is safe to remove them and their associated getter functions.
Comment 78 Carlos Soriano 2016-08-21 16:22:28 UTC
Review of attachment 333745 [details] [review]:

ok
Comment 79 Carlos Soriano 2016-08-21 16:23:01 UTC
Review of attachment 333746 [details] [review]:

ok
Comment 80 Carlos Soriano 2016-08-21 16:24:23 UTC
Review of attachment 333745 [details] [review]:

ok
Comment 81 Carlos Soriano 2016-08-21 16:28:15 UTC
Review of attachment 333747 [details] [review]:

ok except:

::: gnome-autoar/autoar-extract.c
@@ +1415,3 @@
+
+  arextract->priv->source_basename =
+                            NULL);

can they be in the same line?
Comment 82 Carlos Soriano 2016-08-21 16:28:49 UTC
Review of attachment 333748 [details] [review]:

+1
Comment 83 Carlos Soriano 2016-08-21 16:33:57 UTC
Review of attachment 333749 [details] [review]:

Can we rename decide_dest to decide_destination?

::: gnome-autoar/autoar-extract.c
@@ +1488,3 @@
+     * the extension). If they do, then the destination should be the output
+     * directory itself.
+     */

just realized something...what if the compressed file doesn't have an extension in the name? this would fail.

@@ +1512,2 @@
+  if (g_error_matches (priv->error, G_IO_ERROR, G_IO_ERROR_EXISTS)) {
+    g_clear_error (&priv->error);

Add a comment explaining why we do nothing, and what could we do for future improvements, as said in IRC
Comment 84 Carlos Soriano 2016-08-21 16:35:32 UTC
Review of attachment 333750 [details] [review]:

::: gnome-autoar/autoar-extract.c
@@ +1564,2 @@
+static void
+autoar_extract_step_decide_destination (AutoarExtract *arextract)

oh ok, forget about the last patch review :)

@@ +1628,3 @@
+
+    if (file_type == G_FILE_TYPE_DIRECTORY) {
+

Add a comment here about imrproving this on the future. you can use FIXME as is common.
Comment 85 Carlos Soriano 2016-08-21 16:38:13 UTC
Review of attachment 333751 [details] [review]:

::: gnome-autoar/autoar-extract.c
@@ +1785,3 @@
 
+    /* Attempt to solve any name conflict before doing any operations */
+    action = AUTOAR_CONFLICT_OVERWRITE;

why this need initialization? if it's a dummy value, we could create a new value in the enum like INVALID or so.
Comment 86 Carlos Soriano 2016-08-21 16:39:14 UTC
Review of attachment 333752 [details] [review]:

+1
Comment 87 Carlos Soriano 2016-08-21 16:39:32 UTC
Review of attachment 333753 [details] [review]:

ok
Comment 88 Carlos Soriano 2016-08-21 16:41:11 UTC
Review of attachment 333754 [details] [review]:

::: tests/test-extract-unit.c
@@ +50,3 @@
+
+static gboolean
+remove_dir (GFile *dir)

missed this abreviation in the previous review
Comment 89 Carlos Soriano 2016-08-21 16:41:32 UTC
Review of attachment 333755 [details] [review]:

ok
Comment 90 Carlos Soriano 2016-08-21 16:42:01 UTC
Review of attachment 333756 [details] [review]:

ok
Comment 91 Carlos Soriano 2016-08-21 16:42:36 UTC
Review of attachment 333757 [details] [review]:

ok
Comment 92 Carlos Soriano 2016-08-21 16:44:04 UTC
Review of attachment 333758 [details] [review]:

ok
Comment 93 Carlos Soriano 2016-08-21 16:44:31 UTC
Review of attachment 333759 [details] [review]:

ok
Comment 94 Carlos Soriano 2016-08-21 16:44:56 UTC
Review of attachment 333760 [details] [review]:

ok
Comment 95 Carlos Soriano 2016-08-21 16:45:20 UTC
Review of attachment 333761 [details] [review]:

ok
Comment 96 Carlos Soriano 2016-08-21 16:45:50 UTC
Review of attachment 333762 [details] [review]:

ok
Comment 97 Carlos Soriano 2016-08-21 16:46:15 UTC
Review of attachment 333763 [details] [review]:

ok
Comment 98 Carlos Soriano 2016-08-21 16:46:49 UTC
Review of attachment 333764 [details] [review]:

ok
Comment 99 Carlos Soriano 2016-08-21 16:47:23 UTC
Review of attachment 333765 [details] [review]:

ok
Comment 100 Carlos Soriano 2016-08-21 17:06:21 UTC
Review of attachment 333766 [details] [review]:

As said on IRC, we might want for convenience to provide this data, since clients could use it to make the code cleaner, sharing code with the compression object which have the same attributes.
The bad point is that we have to scan the sources, but that sounds like a sane thing to do, we might want to validate them after all.

Since this is not critical now, let's just not remove these properties and we will implement the scanning afterwards.

So marking as rejected.
Comment 101 Carlos Soriano 2016-08-21 17:07:47 UTC
Review of attachment 333749 [details] [review]:

the comments here belong to the next patch, so changing as accept-commit-now
Comment 102 Razvan Chitu 2016-08-21 21:11:34 UTC
Created attachment 333843 [details] [review]
AutoarExtract: restrict object initalization to use GFile

In conformity with the GLib API, change AutoarExtract API to work with GFiles
instead of strings.
Comment 103 Razvan Chitu 2016-08-21 21:11:51 UTC
Created attachment 333844 [details] [review]
AutoarExtract: refactor destination decision process

Previously, the destination of an extraction could not be modified by the user
application once the AutoarExtract object was created. This leads to a big lack
of flexibility, because there are many cases when the destination depends on the
contents of the archive, unknown at object creation time.

In order to fix this, when the destination is notified to the user, also notify
the list of files in the archive and enable the user to set a new destination.
Comment 104 Razvan Chitu 2016-08-21 21:12:06 UTC
Created attachment 333845 [details] [review]
AutoarExtract: add signal for name conflicts

Extraction was previously done with overwrite as the default option for existing
files. A better solution would be to detect conflicts and notify the user
application, offering the possibility to change the destination of the extracted
file.

In order to fix this, add a signal for notifying conflicts. This signal gets
emitted before actually extracting a file.
Comment 105 Razvan Chitu 2016-08-21 21:12:23 UTC
Created attachment 333846 [details] [review]
Add tests for the extract operation
Comment 106 Razvan Chitu 2016-08-21 21:15:06 UTC
Created attachment 333847 [details] [review]
Add tests for the extract operation
Comment 107 Carlos Soriano 2016-08-21 21:17:58 UTC
Review of attachment 333843 [details] [review]:

ok
Comment 108 Carlos Soriano 2016-08-21 21:18:53 UTC
Review of attachment 333844 [details] [review]:

ok
Comment 109 Carlos Soriano 2016-08-21 21:20:30 UTC
Review of attachment 333845 [details] [review]:

much better
Comment 110 Carlos Soriano 2016-08-21 21:21:45 UTC
Review of attachment 333847 [details] [review]:

::: tests/test-extract-unit.c
@@ +50,3 @@
+
+static gboolean
+remove_directory (GFile *dir)

you are still missing the abreviation in the parameter. Use directory or file or whatever
Comment 111 Razvan Chitu 2016-08-21 21:24:45 UTC
Created attachment 333848 [details] [review]
Add tests for the extract operation
Comment 112 Carlos Soriano 2016-08-21 21:26:20 UTC
Review of attachment 333848 [details] [review]:

YEAH, all commit_accept_now, congrats!
Comment 113 Carlos Soriano 2016-08-21 21:35:26 UTC
Comment on attachment 333766 [details] [review]
AutoarCompressor: remove unused properties

Marking as obsolete since we rejected it.
Comment 114 Razvan Chitu 2016-08-22 09:39:58 UTC
Created attachment 333876 [details] [review]
AutoarExtract: fix return value of getter function

autoar_extract_get_output_is_dest returned source_is_mem instead.
Comment 115 Razvan Chitu 2016-08-22 09:40:05 UTC
Created attachment 333877 [details] [review]
AutoarExtract: remove support for memory files

While libarchive offers support for archives read from memory, there is no use
case for this feature in gnome-autoar.
Comment 116 Razvan Chitu 2016-08-22 09:40:12 UTC
Created attachment 333878 [details] [review]
AutoarExtract: restrict object initalization to use GFile

In conformity with the GLib API, change AutoarExtract API to work with GFiles
instead of strings.
Comment 117 Razvan Chitu 2016-08-22 09:40:19 UTC
Created attachment 333879 [details] [review]
AutoarExtract: remove pattern checking

Filtering extracted files by pathname should not be the responsibility of the
AutoarExtract instances.
Comment 118 Razvan Chitu 2016-08-22 09:40:26 UTC
Created attachment 333880 [details] [review]
AutoarExtract: refactor pathname building process

Previously, operations with pathnames obtained from libarchive were performed
directly on strings, without the use of the GFile API. This lead to an
increasing complexity of the code and also to oversights. Also, the process of
turning a path in the archive to a path on the file system had a complex logic.
It relied on multiple parameters that could have different meanings according to
some context elements, such as the number of files in an archive. One example is
the `top_level_dir` member, which could be a file if the archive had just one
element inside, or a directory in other situations.

In order to fix these issues, use the GFile API for path operations, like
finding a common prefix, path concatenation etc. For the logic part, make sure
that the top level directory is always a directory so the number of checks can
be reduced.
Comment 119 Razvan Chitu 2016-08-22 09:40:34 UTC
Created attachment 333881 [details] [review]
AutoarExtract: refactor destination decision process

Previously, the destination of an extraction could not be modified by the user
application once the AutoarExtract object was created. This leads to a big lack
of flexibility, because there are many cases when the destination depends on the
contents of the archive, unknown at object creation time.

In order to fix this, when the destination is notified to the user, also notify
the list of files in the archive and enable the user to set a new destination.
Comment 120 Razvan Chitu 2016-08-22 09:40:41 UTC
Created attachment 333882 [details] [review]
AutoarExtract: add signal for name conflicts

Extraction was previously done with overwrite as the default option for existing
files. A better solution would be to detect conflicts and notify the user
application, offering the possibility to change the destination of the extracted
file.

In order to fix this, add a signal for notifying conflicts. This signal gets
emitted before actually extracting a file.
Comment 121 Razvan Chitu 2016-08-22 09:40:49 UTC
Created attachment 333883 [details] [review]
AutoarExtract: remove AutoarPref member

After removing pattern checking from AutoarExtract, the AutoarPref member was
only used for deleting the original archive if the operation succeeds. This
should be replaced with a boolean property in the AutoarExtract class.
Comment 122 Razvan Chitu 2016-08-22 09:40:57 UTC
Created attachment 333884 [details] [review]
AutoarExtract: make the type final

Since it is not expected to derive AutoarExtract now, make it a final type.
Comment 123 Razvan Chitu 2016-08-22 09:41:05 UTC
Created attachment 333885 [details] [review]
Add tests for the extract operation
Comment 124 Razvan Chitu 2016-08-22 09:41:12 UTC
Created attachment 333886 [details] [review]
AutoarCreate: report correct size for non-regular files

The size reported for non-regular files was the size in the archive and not the
size on the disk, which would lead to bad progress information. In order to fix
this, make sure that the size on the disk is the one reported.
Comment 125 Razvan Chitu 2016-08-22 09:41:20 UTC
Created attachment 333887 [details] [review]
AutoarCreate: refactor object initialization

Instead of using string or pointer arrays, use only GList with GFiles.
Comment 126 Razvan Chitu 2016-08-22 09:41:27 UTC
Created attachment 333888 [details] [review]
AutoarCreate: remove AutoarPref member

The AutoarPref object is only used for getting the compression format and
filter for the operation. Replace it with explicit format and filter properties
that are set on object construction.
Comment 127 Razvan Chitu 2016-08-22 09:41:34 UTC
Created attachment 333889 [details] [review]
AutoarCreate: add property for creating a top level directory

Previously, AutoarCreate would create a top level directory if more than one
files would be compressed. This leads to problems because clients cannot decide
whether they want a top level directory or not. In order to fix this, add a
property for creating a top level directory.
Comment 128 Razvan Chitu 2016-08-22 09:41:42 UTC
Created attachment 333890 [details] [review]
AutoarCreate: make the type final

Since it is not expected to derive AutoarCreate now, make it a final type.
Comment 129 Razvan Chitu 2016-08-22 09:41:50 UTC
Created attachment 333891 [details] [review]
AutoarExtract: rename to AutoarExtractor
Comment 130 Razvan Chitu 2016-08-22 09:41:57 UTC
Created attachment 333892 [details] [review]
AutoarCreate: rename to AutoarCompressor
Comment 131 Razvan Chitu 2016-08-22 09:42:05 UTC
Created attachment 333893 [details] [review]
general: add getter of supported mime types
Comment 132 Razvan Chitu 2016-08-22 09:42:12 UTC
Created attachment 333894 [details] [review]
general: remove AutoarPref

Since neither AutoarCreate or AutoarExtract use it anymore, AutoarPref can be
safely removed.
Comment 133 Razvan Chitu 2016-08-22 09:42:20 UTC
Created attachment 333895 [details] [review]
general: use library name for the main header

Since other libraries use the library name for their main header file,
gnome-autoar should do it too.
Comment 134 Razvan Chitu 2016-08-22 09:42:28 UTC
Created attachment 333896 [details] [review]
AutoarExtractor: rename properties and functions

The "files" and "size" properties of AutoarExtractor actually reflect the total
files and the total size within the archive, so they should be named properly.
Comment 135 Razvan Chitu 2016-08-22 09:48:15 UTC
The following fixes have been pushed:
Comment 136 Razvan Chitu 2016-08-22 09:50:09 UTC
Comment on attachment 333896 [details] [review]
AutoarExtractor: rename properties and functions

Attachment 333896 [details] pushed as 74de0ff - AutoarExtractor: rename properties and functions
Comment 137 Razvan Chitu 2016-08-22 09:51:47 UTC
Attachment 333876 [details] pushed as 21c309a - AutoarExtract: fix return value of getter function
Attachment 333877 [details] pushed as 5b6837d - AutoarExtract: remove support for memory files
Attachment 333878 [details] pushed as ec52fc6 - AutoarExtract: restrict object initalization to use GFile
Attachment 333879 [details] pushed as 08cf354 - AutoarExtract: remove pattern checking
Attachment 333880 [details] pushed as a79ced0 - AutoarExtract: refactor pathname building process
Attachment 333881 [details] pushed as de85c5c - AutoarExtract: refactor destination decision process
Attachment 333882 [details] pushed as e08008e - AutoarExtract: add signal for name conflicts
Attachment 333883 [details] pushed as 5a5cfc8 - AutoarExtract: remove AutoarPref member
Attachment 333884 [details] pushed as 6647fe4 - AutoarExtract: make the type final
Attachment 333885 [details] pushed as 2be19e2 - Add tests for the extract operation
Attachment 333886 [details] pushed as 9a1e5c3 - AutoarCreate: report correct size for non-regular files
Attachment 333887 [details] pushed as 6264c28 - AutoarCreate: refactor object initialization
Attachment 333888 [details] pushed as 2901c81 - AutoarCreate: remove AutoarPref member
Attachment 333889 [details] pushed as 04289f2 - AutoarCreate: add property for creating a top level directory
Attachment 333890 [details] pushed as ec1ab07 - AutoarCreate: make the type final
Attachment 333891 [details] pushed as 231a29f - AutoarExtract: rename to AutoarExtractor
Attachment 333892 [details] pushed as f0241a3 - AutoarCreate: rename to AutoarCompressor
Attachment 333893 [details] pushed as 086ec59 - general: add getter of supported mime types
Attachment 333894 [details] pushed as 965a4ff - general: remove AutoarPref
Attachment 333895 [details] pushed as 1360e3f - general: use library name for the main header