You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// with the fs driver// writes `foo/bar`awaitstorage.setItem("foo:bar","content");// returns `foo/bar`awaitstorage.getKeys();
Describe the bug
When we setItem, we normalise keys by replacing / with :.
This means, in the FS adapters especially, both setItem("foo/bar", v) or setItem("foo:bar", v) will write to the same file.
however, when we later call getKeys(), we don't translate those keys on the way out.
this means we will receive / separated keys (e.g. foo/bar in the previous example).
we probably only want to deal with / separated keys as input, but always expose keys from our side as : separated. that would mean getKeys of each driver needs to replaceAll("/", ":") basically.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Okay, okay thanks for confirm. let's close it, if you had any chance to evaluate how many "drivers" currently don't normalize (if majority do, we might remove core overheadperhaps not sure if there is benefit..)
Environment
N/A (all)
Reproduction
Describe the bug
When we
setItem
, we normalise keys by replacing/
with:
.This means, in the FS adapters especially, both
setItem("foo/bar", v)
orsetItem("foo:bar", v)
will write to the same file.however, when we later call
getKeys()
, we don't translate those keys on the way out.this means we will receive
/
separated keys (e.g.foo/bar
in the previous example).we probably only want to deal with
/
separated keys as input, but always expose keys from our side as:
separated. that would meangetKeys
of each driver needs toreplaceAll("/", ":")
basically.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: