whikloj / BagItTools

A PHP BagIt library
MIT License
11 stars 5 forks source link

Path issues on a Windows environment #45

Closed jonasraoni closed 2 years ago

jonasraoni commented 2 years ago

Hi @whikloj!

We're using your package to preserve academic journals at @pkp, and some users had issues under Windows, which I've just confirmed by my own.

Are you open for contributions? For now I saw just two issues:

tests/resources/TestEncodingBag/data/carriage return-file.txt

tests/resources/TestEncodingBag/data/directory line break/carriage return/Example-file-%-and-%25.txt

tests/resources/TestEncodingBag/data/directory line break/some-file.txt



p.s.: About the cloning problem, that's not a real issue for us, as `composer` is "fixing" the paths by itself.
whikloj commented 2 years ago

Hi @jonasraoni,

I'm more than happy to accept contributions if it helps. I have not yet, but have considered trying to setup Windows under Github Actions. If you have any experience with that I'd love it.

As for the filenames, those tests might be overkill. I'll have a look and see if I can replicate the test generated test objects.

jonasraoni commented 2 years ago

Hi @whikloj!

I've left a PR here:

I tried to organize the commits, and left some comments to make it easier to review 👀

About the problematic files, I've removed them and updated the tests, let me know if you're ok with it.

whikloj commented 2 years ago

Resolved with https://github.com/whikloj/BagItTools/commit/f2496ced53cee2ab6aceda965d2f70cf5c755311