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 @@ -102,14 +102,22 @@ def relink_initialworkdir(
102
102
| stat .S_IWGRP
103
103
| stat .S_IWOTH
104
104
)
105
+ mode = 0o664 # Doesn't work for my code
106
+ mode = 0o777 # works for my code
105
107
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
108
113
elif os .path .isdir (host_outdir_tgt ) and not vol .resolved .startswith ("_:" ):
109
114
os .chmod (host_outdir_tgt , mode )
110
115
shutil .rmtree (host_outdir_tgt )
111
116
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
113
121
114
122
115
123
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