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 @@ -102,14 +102,22 @@ def relink_initialworkdir(
102102 | stat .S_IWGRP
103103 | stat .S_IWOTH
104104 )
105+ mode = 0o664 # Doesn't work for my code
106+ mode = 0o777 # works for my code
105107 if os .path .islink (host_outdir_tgt ) or os .path .isfile (host_outdir_tgt ):
106- os .chmod (host_outdir_tgt , mode )
107- os .remove (host_outdir_tgt )
108+ try :
109+ os .chmod (host_outdir_tgt , mode )
110+ os .remove (host_outdir_tgt )
111+ except PermissionError :
112+ pass
108113 elif os .path .isdir (host_outdir_tgt ) and not vol .resolved .startswith ("_:" ):
109114 os .chmod (host_outdir_tgt , mode )
110115 shutil .rmtree (host_outdir_tgt )
111116 if not vol .resolved .startswith ("_:" ):
112- os .symlink (vol .resolved , host_outdir_tgt )
117+ try :
118+ os .symlink (vol .resolved , host_outdir_tgt )
119+ except FileExistsError :
120+ pass
113121
114122
115123def neverquote (string : str , pos : int = 0 , endpos : int = 0 ) -> Optional [Match [str ]]:
You can’t perform that action at this time.
0 commit comments