int verify_path(const char *path, unsigned mode)
{
- char c;
+ char c = 0;
if (has_dos_drive_prefix(path))
return 0;
if (is_dir_sep(c)) {
inside:
if (protect_hfs) {
+
if (is_hfs_dotgit(path))
return 0;
if (S_ISLNK(mode)) {
}
}
if (protect_ntfs) {
+#ifdef GIT_WINDOWS_NATIVE
+ if (c == '\\')
+ return 0;
+#endif
if (is_ntfs_dotgit(path))
return 0;
if (S_ISLNK(mode)) {
int skip_df_check = option & ADD_CACHE_SKIP_DFCHECK;
int new_only = option & ADD_CACHE_NEW_ONLY;
-#ifdef GIT_WINDOWS_NATIVE
- if (protect_ntfs && strchr(ce->name, '\\'))
- return error(_("filename in tree entry contains backslash: '%s'"), ce->name);
-#endif
-
if (!(option & ADD_CACHE_KEEP_CACHE_TREE))
cache_tree_invalidate_path(istate, ce->name);