File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -785,6 +785,10 @@ def revbranches(rev):
785
785
786
786
def ignores ():
787
787
try :
788
+ ignore_file_parent_directory = os .path .dirname (Git .ignore_file )
789
+ if not os .path .exists (ignore_file_parent_directory ):
790
+ os .mkdir (ignore_file_parent_directory )
791
+
788
792
with open (Git .ignore_file , 'w' ) as f :
789
793
f .write ('\n ' .join (ignores )+ '\n ' )
790
794
except IOError :
@@ -799,6 +803,10 @@ def ignore(dest):
799
803
800
804
if not exists :
801
805
try :
806
+ ignore_file_parent_directory = os .path .dirname (Git .ignore_file )
807
+ if not os .path .exists (ignore_file_parent_directory ):
808
+ os .mkdir (ignore_file_parent_directory )
809
+
802
810
with open (Git .ignore_file , 'a' ) as f :
803
811
f .write (dest .replace ("\\ " , "/" ) + '\n ' )
804
812
except IOError :
@@ -813,6 +821,10 @@ def unignore(dest):
813
821
if dest in lines :
814
822
lines .remove (dest )
815
823
try :
824
+ ignore_file_parent_directory = os .path .dirname (Git .ignore_file )
825
+ if not os .path .exists (ignore_file_parent_directory ):
826
+ os .mkdir (ignore_file_parent_directory )
827
+
816
828
with open (Git .ignore_file , 'w' ) as f :
817
829
f .write ('\n ' .join (lines ) + '\n ' )
818
830
except IOError :
You can’t perform that action at this time.
0 commit comments