Skip to content

Commit

Permalink
unarchive: fix bug with local file handling
Browse files Browse the repository at this point in the history
  • Loading branch information
lowell80 committed Dec 5, 2023
1 parent 5941936 commit 4602b38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Renames:
- ``ksconf/commands/__init__.py`` -> ``ksconf/command.py``


Ksconf v0.13.5 (DRAFT)
Ksconf v0.13.6 (DRAFT)
~~~~~~~~~~~~~~~~~~~~~~~~~~~

**API Changes**:
Expand All @@ -33,7 +33,10 @@ Ksconf v0.13.5 (DRAFT)
Hopefully not many people are relying on this function yet, at it was only introduced 2 moths ago in v0.11.5.
This function will be removed in v0.20.0.
* Created new :py:func:`~ksconf.conf.parser.write_conf_string` function for writing a conf file to a python string.


* Add new ``--empty-stanza`` to :ref:`ksconf_cmd_filter`. Thanks to Manoj Baba for the idea.
* Fix ``unarchive`` bug when dealing with local files.


Ksconf v0.13.5 (2023-10-20)
Expand Down
4 changes: 2 additions & 2 deletions ksconf/commands/unarchive.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def run(self, args):
self.stderr.write(f"The 'unarchive' command does not support the {tarball} archive.\n{e}")
return EXIT_CODE_FAILED_SAFETY_CHECK

local_files = set(app_manifest.find_local())
local_files = list(app_manifest.find_local())
app_name = app_facts.name

if local_files:
Expand Down Expand Up @@ -298,7 +298,7 @@ def fixup_pattern_bw(patterns, prefix=None):
excludes = list(args.exclude)
if not args.allow_local:
for pattern in local_files:
excludes.append("./" + pattern)
excludes.append(f"./{pattern.path}")
excludes = fixup_pattern_bw(excludes, app_basename)
self.stderr.write(f"Extraction exclude patterns: {excludes!r}\n")
exclude_filter = create_filtered_list("splunk", default=False)
Expand Down

0 comments on commit 4602b38

Please sign in to comment.