squirrel-core icon indicating copy to clipboard operation
squirrel-core copied to clipboard

Unifies folder-creation behaviour when instantiation SquirrelStore

Open pzdkn opened this issue 2 years ago • 0 comments

Description

Currently local and GCS filesystems show different behaviour, when SquirrelStore is initialized. In local filesystems, a root directory is created, whereas for GCS a creation is not possible.We solve this by creating the directory only when the first shard is written.

Another related issue fixed in this PR, is that previously if a directory does not exist and the clean flag is set to true, an error is thrown. The directory removal is now skipped, when the dir does not exist.

Type of change

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Documentation update
  • [ ] Refactoring including code style reformatting
  • [ ] Other (please describe):

Checklist:

  • [ ] I have read the contributing guideline doc (external contributors only)
  • [x] Lint and unit tests pass locally with my changes
  • [ ] I have kept the PR small so that it can be easily reviewed
  • [ ] I have made corresponding changes to the documentation
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [ ] All dependency changes have been reflected in the pip requirement files.

pzdkn avatar Jul 29 '22 08:07 pzdkn