File tree Expand file tree Collapse file tree
src/DIRAC/FrameworkSystem/Service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,9 +72,16 @@ def updateBundles(self):
7272 Path (os .path .commonpath (paths )).parent if len (paths ) == 1 else Path (os .path .commonpath (paths ))
7373 )
7474 gLogger .info (f"Bundle will have { len (filesToBundle )} files with common path { commonParent } " )
75+
76+ def _makeWritable (tarinfo ):
77+ # Ensure files are extracted as writable so subsequent syncs can overwrite them.
78+ # by setting the owner-write bit (0o200)
79+ tarinfo .mode |= 0o200
80+ return tarinfo
81+
7582 with tarfile .open ("dummy" , "w:gz" , buffer_ ) as tarBuffer :
7683 for p in paths :
77- tarBuffer .add (str (p ), str (p .relative_to (commonParent )))
84+ tarBuffer .add (str (p ), str (p .relative_to (commonParent )), filter = _makeWritable )
7885 zippedData = buffer_ .getvalue ()
7986 buffer_ .close ()
8087 hash_ = File .getMD5ForFiles (filesToBundle )
You can’t perform that action at this time.
0 commit comments