catalog: shell: Allow two or more successive slashes in path.
Two or more successive slashes should be allowed and treated as a single slash. We also do not treat two successive slashes at the beginning of a path any different. Details are found here: https://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap04.html#tag_04_11 Signed-off-by: Christian Ebner <c.ebner@proxmox.com> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
9ff9a00572
commit
ba050e3788
@ -616,6 +616,7 @@ impl Context {
|
|||||||
};
|
};
|
||||||
for name in path_slice.split('/') {
|
for name in path_slice.split('/') {
|
||||||
match name {
|
match name {
|
||||||
|
"" => continue, // Multiple successive slashes are valid and treated as one.
|
||||||
"." => continue,
|
"." => continue,
|
||||||
".." => {
|
".." => {
|
||||||
// Never pop archive root from stack
|
// Never pop archive root from stack
|
||||||
|
Loading…
Reference in New Issue
Block a user