File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -100,14 +100,22 @@ def relink_initialworkdir(
100100 | stat .S_IWGRP
101101 | stat .S_IWOTH
102102 )
103+ mode = 0o664 # Doesn't work for my code
104+ mode = 0o777 # works for my code
103105 if os .path .islink (host_outdir_tgt ) or os .path .isfile (host_outdir_tgt ):
104- os .chmod (host_outdir_tgt , mode )
105- os .remove (host_outdir_tgt )
106+ try :
107+ os .chmod (host_outdir_tgt , mode )
108+ os .remove (host_outdir_tgt )
109+ except PermissionError :
110+ pass
106111 elif os .path .isdir (host_outdir_tgt ) and not vol .resolved .startswith ("_:" ):
107112 os .chmod (host_outdir_tgt , mode )
108113 shutil .rmtree (host_outdir_tgt )
109114 if not vol .resolved .startswith ("_:" ):
110- os .symlink (vol .resolved , host_outdir_tgt )
115+ try :
116+ os .symlink (vol .resolved , host_outdir_tgt )
117+ except FileExistsError :
118+ pass
111119
112120
113121def neverquote (string : str , pos : int = 0 , endpos : int = 0 ) -> Optional [Match [str ]]:
You can’t perform that action at this time.
0 commit comments