Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvs: key of a...b confuses kvs #1180

Closed
garlick opened this issue Sep 6, 2017 · 1 comment
Closed

kvs: key of a...b confuses kvs #1180

garlick opened this issue Sep 6, 2017 · 1 comment

Comments

@garlick
Copy link
Member

garlick commented Sep 6, 2017

Consecutive path separators in the middle of a key are not handled properly.

$ flux kvs put a..b=42
$ flux kvs get a
$ flux kvs get a.
flux-kvs: a.: Is a directory
$ flux kvs get a..
flux-kvs: a..: No such file or directory
$ flux kvs get a..b
42
$ flux kvs ls -RF a
a:
.

a.:
b
$ flux kvs ls -RF
.:
a.          foo.        resource.

a:
.

a.:
b

[snip]
@garlick
Copy link
Member Author

garlick commented Sep 6, 2017

Keys should undergo "normalization" in the KVS service before they are passed to any internal functions. This would involve transforming multiple consecutive path separators to a single one.

Since we have no concept of "current working directory", leading path separators can be stripped.

We need some rules for handling trailing path separators, as discussed in #1173.

Test cases are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant