GNOME Bugzilla – Bug 768645
Redesign the API and logic of compression and decompression
Last modified: 2016-08-22 18:03:06 UTC
See patches.
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.
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.
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.
Created attachment 331179 [details] [review] Add tests for the extract operation
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.
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.
Created attachment 333646 [details] [review] AutoarExtract: remove pattern checking Filtering extracted files by pathname should not be the responsibility of the AutoarExtract instances.
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.
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.
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.
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.
Created attachment 333651 [details] [review] AutoarExtract: make the type final Since it is not expected to derive AutoarExtract now, make it a final type.
Created attachment 333652 [details] [review] Add tests for the extract operation
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.
Created attachment 333654 [details] [review] AutoarCreate: refactor object initialization Instead of using string or pointer arrays, use only GList with GFiles.
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.
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.
Created attachment 333657 [details] [review] AutoarCreate: make the type final Since it is not expected to derive AutoarCreate now, make it a final type.
Created attachment 333658 [details] [review] AutoarExtract: rename to AutoarExtractor
Created attachment 333659 [details] [review] AutoarCreate: rename to AutoarCompressor
Created attachment 333660 [details] [review] general: add functions for checking if mime types are supported
Created attachment 333661 [details] [review] general: remove AutoarPref Since neither AutoarCreate or AutoarExtract use it anymore, AutoarPref can be safely removed.
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.
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.
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
Review of attachment 333645 [details] [review]: LGTM
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
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
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??
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.
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?
Review of attachment 333651 [details] [review]: yeah!
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?
Review of attachment 333653 [details] [review]: OK
Review of attachment 333654 [details] [review]: oh yeah, thanks for this one
Review of attachment 333655 [details] [review]: nice
Review of attachment 333656 [details] [review]: ::: gnome-autoar/autoar-create.c @@ +90,3 @@ int output_is_dest : 1; + gboolean started; what?
Review of attachment 333657 [details] [review]: we could have changed the arcreate variables to self, but it's fine.
Review of attachment 333658 [details] [review]: yeah
Review of attachment 333659 [details] [review]: +1
Review of attachment 333660 [details] [review]: commit message title too long. How about "general: add getter of supported mime types"
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.
Review of attachment 333661 [details] [review]: +1
Review of attachment 333662 [details] [review]: yeah
Review of attachment 333663 [details] [review]: +1
(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?
(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.
Created attachment 333734 [details] [review] AutoarExtract: fix return value of getter function autoar_extract_get_output_is_dest returned source_is_mem instead.
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.
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.
(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.
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.
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.
Created attachment 333743 [details] [review] AutoarExtract: make the type final Since it is not expected to derive AutoarExtract now, make it a final type.
Created attachment 333745 [details] [review] AutoarExtract: fix return value of getter function autoar_extract_get_output_is_dest returned source_is_mem instead.
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.
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.
Created attachment 333748 [details] [review] AutoarExtract: remove pattern checking Filtering extracted files by pathname should not be the responsibility of the AutoarExtract instances.
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.
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.
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.
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.
Created attachment 333753 [details] [review] AutoarExtract: make the type final Since it is not expected to derive AutoarExtract now, make it a final type.
Created attachment 333754 [details] [review] Add tests for the extract operation
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.
Created attachment 333756 [details] [review] AutoarCreate: refactor object initialization Instead of using string or pointer arrays, use only GList with GFiles.
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.
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.
Created attachment 333759 [details] [review] AutoarCreate: make the type final Since it is not expected to derive AutoarCreate now, make it a final type.
Created attachment 333760 [details] [review] AutoarExtract: rename to AutoarExtractor
Created attachment 333761 [details] [review] AutoarCreate: rename to AutoarCompressor
Created attachment 333762 [details] [review] general: add getter of supported mime types
Created attachment 333763 [details] [review] general: remove AutoarPref Since neither AutoarCreate or AutoarExtract use it anymore, AutoarPref can be safely removed.
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.
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.
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.
Review of attachment 333745 [details] [review]: ok
Review of attachment 333746 [details] [review]: ok
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?
Review of attachment 333748 [details] [review]: +1
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
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.
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.
Review of attachment 333752 [details] [review]: +1
Review of attachment 333753 [details] [review]: ok
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
Review of attachment 333755 [details] [review]: ok
Review of attachment 333756 [details] [review]: ok
Review of attachment 333757 [details] [review]: ok
Review of attachment 333758 [details] [review]: ok
Review of attachment 333759 [details] [review]: ok
Review of attachment 333760 [details] [review]: ok
Review of attachment 333761 [details] [review]: ok
Review of attachment 333762 [details] [review]: ok
Review of attachment 333763 [details] [review]: ok
Review of attachment 333764 [details] [review]: ok
Review of attachment 333765 [details] [review]: ok
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.
Review of attachment 333749 [details] [review]: the comments here belong to the next patch, so changing as accept-commit-now
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.
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.
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.
Created attachment 333846 [details] [review] Add tests for the extract operation
Created attachment 333847 [details] [review] Add tests for the extract operation
Review of attachment 333843 [details] [review]: ok
Review of attachment 333844 [details] [review]: ok
Review of attachment 333845 [details] [review]: much better
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
Created attachment 333848 [details] [review] Add tests for the extract operation
Review of attachment 333848 [details] [review]: YEAH, all commit_accept_now, congrats!
Comment on attachment 333766 [details] [review] AutoarCompressor: remove unused properties Marking as obsolete since we rejected it.
Created attachment 333876 [details] [review] AutoarExtract: fix return value of getter function autoar_extract_get_output_is_dest returned source_is_mem instead.
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.
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.
Created attachment 333879 [details] [review] AutoarExtract: remove pattern checking Filtering extracted files by pathname should not be the responsibility of the AutoarExtract instances.
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.
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.
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.
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.
Created attachment 333884 [details] [review] AutoarExtract: make the type final Since it is not expected to derive AutoarExtract now, make it a final type.
Created attachment 333885 [details] [review] Add tests for the extract operation
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.
Created attachment 333887 [details] [review] AutoarCreate: refactor object initialization Instead of using string or pointer arrays, use only GList with GFiles.
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.
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.
Created attachment 333890 [details] [review] AutoarCreate: make the type final Since it is not expected to derive AutoarCreate now, make it a final type.
Created attachment 333891 [details] [review] AutoarExtract: rename to AutoarExtractor
Created attachment 333892 [details] [review] AutoarCreate: rename to AutoarCompressor
Created attachment 333893 [details] [review] general: add getter of supported mime types
Created attachment 333894 [details] [review] general: remove AutoarPref Since neither AutoarCreate or AutoarExtract use it anymore, AutoarPref can be safely removed.
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.
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.
The following fixes have been pushed:
Comment on attachment 333896 [details] [review] AutoarExtractor: rename properties and functions Attachment 333896 [details] pushed as 74de0ff - AutoarExtractor: rename properties and functions
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