From ba050e3788aa7b0f0fe4f3a0a2968f1849f70b2d Mon Sep 17 00:00:00 2001 From: Christian Ebner Date: Tue, 4 Feb 2020 13:37:03 +0100 Subject: [PATCH] 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 Signed-off-by: Wolfgang Bumiller --- src/backup/catalog_shell.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backup/catalog_shell.rs b/src/backup/catalog_shell.rs index 0c2827a0..0d467cb8 100644 --- a/src/backup/catalog_shell.rs +++ b/src/backup/catalog_shell.rs @@ -616,6 +616,7 @@ impl Context { }; for name in path_slice.split('/') { match name { + "" => continue, // Multiple successive slashes are valid and treated as one. "." => continue, ".." => { // Never pop archive root from stack