summaryrefslogtreecommitdiffstats
path: root/src/interface
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface')
-rw-r--r--src/interface/efi/efi_file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interface/efi/efi_file.c b/src/interface/efi/efi_file.c
index e10c2ec4e..48fccdbe1 100644
--- a/src/interface/efi/efi_file.c
+++ b/src/interface/efi/efi_file.c
@@ -388,8 +388,12 @@ efi_file_open ( EFI_FILE_PROTOCOL *this, EFI_FILE_PROTOCOL **new,
name++;
}
+ /* Strip redundant path separator characters */
+ while ( ( *name == '\\' ) || ( *name == '.' ) )
+ name++;
+
/* Allow root directory itself to be opened */
- if ( ( name[0] == '\0' ) || ( name[0] == '.' ) )
+ if ( ! *name )
return efi_file_open_fixed ( &efi_file_root, wname, new );
/* Fail unless opening from the root */