lendup / fs2-blobstore

Minimal, idiomatic, stream-based Scala interface for key/value store implementations
Apache License 2.0
92 stars 26 forks source link

Problem extending paths that are created with no key #36

Open DougC opened 5 years ago

DougC commented 5 years ago

This test will fail:

  it should "extend a path with no key correctly" in {
    val path = Path("some-bucket") / "key"

    path must be(Path("some-bucket", "key", None, false, None))
  }

with some-bucket//key was not equal to some-bucket/key

The extension code doesn't check for the empty initial key and you end up with a double '/' in the resulting path.

I'm happy to put together a PR to fix this. Either it can check for a blank key string when extending, or I could change Path.key to be Option[String] to make it more explicit.

Daenyth commented 5 years ago

fixed?