diff options
Diffstat (limited to 'submodule-config.c')
-rw-r--r-- | submodule-config.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/submodule-config.c b/submodule-config.c index 29668b0620..ce3beaf5d4 100644 --- a/submodule-config.c +++ b/submodule-config.c @@ -204,17 +204,17 @@ int check_submodule_name(const char *name) return -1; /* - * Look for '..' as a path component. Check both '/' and '\\' as + * Look for '..' as a path component. Check is_xplatform_dir_sep() as * separators rather than is_dir_sep(), because we want the name rules * to be consistent across platforms. */ goto in_component; /* always start inside component */ while (*name) { char c = *name++; - if (c == '/' || c == '\\') { + if (is_xplatform_dir_sep(c)) { in_component: if (name[0] == '.' && name[1] == '.' && - (!name[2] || name[2] == '/' || name[2] == '\\')) + (!name[2] || is_xplatform_dir_sep(name[2]))) return -1; } } |