|
|
@@ -78,10 +78,16 @@ class StoragePartLock(StorageBase):
|
|
|
preexec_fn = os.setpgrp
|
|
|
# optional argument
|
|
|
path = kwargs.get('path', "")
|
|
|
+ request = kwargs.get('request', "NONE")
|
|
|
+ to_path = kwargs.get('to_path', "")
|
|
|
+ if to_path != "":
|
|
|
+ to_path = shlex.quote(self._get_collection_root_folder() + to_path)
|
|
|
try:
|
|
|
command = self._hook % {
|
|
|
"path": shlex.quote(self._get_collection_root_folder() + path),
|
|
|
+ "to_path": to_path,
|
|
|
"cwd": shlex.quote(self._filesystem_folder),
|
|
|
+ "request": shlex.quote(request),
|
|
|
"user": shlex.quote(user or "Anonymous")}
|
|
|
except KeyError as e:
|
|
|
logger.error("Storage hook contains not supported placeholder %s (skip execution of: %r)" % (e, self._hook))
|