MarketSquare / robotframework-archivelibrary

https://github.com/MarketSquare/robotframework-archivelibrary
22 stars 24 forks source link

add tgz support to tar creation keyword #40

Closed Nilsty closed 2 years ago

Nilsty commented 3 years ago

I'd like to add the capabilities to create a compressed tar package (.tgz) with one keyword. I added an optional argument to the keyword create_tar_from_files_in_directory which will set the option "w:gz" to tarfile.open. I also added a test case example.

lucagiove commented 2 years ago

@Nilsty Unittest broken that show a not backward compatible change. I think this if is switched:

        if tgz:
            tar = tarfile.open(filename, "w")
        else:
            tar = tarfile.open(filename, "w:gz")

If confirmed please rebase and fix, thanks!