fair-research / bdbag

Big Data Bag Utilities
https://fair-research.org
Apache License 2.0
49 stars 23 forks source link

Fixes directory paths with slash at the end during "archive_bag". #36

Closed sterlingbaldwin closed 4 years ago

sterlingbaldwin commented 4 years ago

If the user passes something like "/Users/me/some_directory/" then what happens is that the tar ends up as "/Users/me/some_directory/.tar" instead of ""/Users/me/some_directory.tar" like it should be. This PR is just two lines that remove the trailing os.sep character from the bag_path so that the tar ends up where it should be.

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 260


Totals Coverage Status
Change from base Build 258: 0.009%
Covered Lines: 6003
Relevant Lines: 6444

💛 - Coveralls
mikedarcy commented 4 years ago

Thanks for reporting this. I fixed it a bit differently in b126a96, but the result should be the same without having to add an additional unit test.

sterlingbaldwin commented 4 years ago

Ah, I didnt see it had been fixed already. Your method is definitely more "pythonic."

mikedarcy commented 4 years ago

Ah, I didnt see it had been fixed already. Your method is definitely more "pythonic."

I hadn't fixed it prior to you reporting the issue, so definite thanks and credit go to you for catching it!

mikedarcy commented 4 years ago

Fixed in b126a96.