File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -100,14 +100,22 @@ def relink_initialworkdir(
100
100
| stat .S_IWGRP
101
101
| stat .S_IWOTH
102
102
)
103
+ mode = 0o664 # Doesn't work for my code
104
+ mode = 0o777 # works for my code
103
105
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
106
111
elif os .path .isdir (host_outdir_tgt ) and not vol .resolved .startswith ("_:" ):
107
112
os .chmod (host_outdir_tgt , mode )
108
113
shutil .rmtree (host_outdir_tgt )
109
114
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
111
119
112
120
113
121
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