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 @@ -107,14 +107,22 @@ def relink_initialworkdir(
107
107
| stat .S_IWGRP
108
108
| stat .S_IWOTH
109
109
)
110
+ mode = 0o664 # Doesn't work for my code
111
+ mode = 0o777 # works for my code
110
112
if os .path .islink (host_outdir_tgt ) or os .path .isfile (host_outdir_tgt ):
111
- os .chmod (host_outdir_tgt , mode )
112
- os .remove (host_outdir_tgt )
113
+ try :
114
+ os .chmod (host_outdir_tgt , mode )
115
+ os .remove (host_outdir_tgt )
116
+ except PermissionError :
117
+ pass
113
118
elif os .path .isdir (host_outdir_tgt ) and not vol .resolved .startswith ("_:" ):
114
119
os .chmod (host_outdir_tgt , mode )
115
120
shutil .rmtree (host_outdir_tgt )
116
121
if not vol .resolved .startswith ("_:" ):
117
- os .symlink (vol .resolved , host_outdir_tgt )
122
+ try :
123
+ os .symlink (vol .resolved , host_outdir_tgt )
124
+ except FileExistsError :
125
+ pass
118
126
119
127
120
128
def neverquote (string : str , pos : int = 0 , endpos : int = 0 ) -> Optional [Match [str ]]:
You can’t perform that action at this time.
0 commit comments