File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -806,6 +806,13 @@ should_ignore_on_checkout (const char *file_path, IgnoreReason *ignore_reason)
806
806
for (; j < n_comps ; ++ j ) {
807
807
file_name = components [j ];
808
808
809
+ if (g_strcmp0 (file_name , "." ) == 0 || g_strcmp0 (file_name , ".." ) == 0 ) {
810
+ if (ignore_reason )
811
+ * ignore_reason = IGNORE_REASON_INVALID_CHARACTER ;
812
+ ret = TRUE;
813
+ goto out ;
814
+ }
815
+
809
816
if (has_trailing_space_or_period (file_name )) {
810
817
/* Ignore files/dir whose path has trailing spaces. It would cause
811
818
* problem on windows. */
@@ -839,6 +846,22 @@ should_ignore_on_checkout (const char *file_path, IgnoreReason *ignore_reason)
839
846
g_strfreev (components );
840
847
#endif
841
848
849
+ char * * components = g_strsplit (file_path , "/" , -1 );
850
+ int n_comps = g_strv_length (components );
851
+ int j = 0 ;
852
+ char * file_name ;
853
+
854
+ for (; j < n_comps ; ++ j ) {
855
+ file_name = components [j ];
856
+ if (g_strcmp0 (file_name , "." ) == 0 || g_strcmp0 (file_name , ".." ) == 0 ) {
857
+ ret = TRUE;
858
+ if (ignore_reason )
859
+ * ignore_reason = IGNORE_REASON_INVALID_CHARACTER ;
860
+ break ;
861
+ }
862
+ }
863
+ g_strfreev (components );
864
+
842
865
return ret ;
843
866
}
844
867
You can’t perform that action at this time.
0 commit comments