This is an automated email from the ASF dual-hosted git repository.
aonishuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new e1ceec2 AMBARI-25004. Directory/File creation hangs if relative path
is supplied with cd_access (aonishuk)
e1ceec2 is described below
commit e1ceec262ddcc02c095941024507048fbccbc255
Author: Andrew Onishuk <[email protected]>
AuthorDate: Thu Dec 6 10:56:49 2018 +0200
AMBARI-25004. Directory/File creation hangs if relative path is supplied
with cd_access (aonishuk)
---
.../src/main/python/resource_management/core/providers/system.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/ambari-common/src/main/python/resource_management/core/providers/system.py
b/ambari-common/src/main/python/resource_management/core/providers/system.py
index acb19d4..a286d03 100644
--- a/ambari-common/src/main/python/resource_management/core/providers/system.py
+++ b/ambari-common/src/main/python/resource_management/core/providers/system.py
@@ -101,7 +101,7 @@ def _ensure_metadata(path, user, group, mode=None,
cd_access=None, recursive_own
raise Fail("'cd_acess' value '%s' is not valid" % (cd_access))
dir_path = re.sub('/+', '/', path)
- while dir_path != os.sep:
+ while dir_path and dir_path != os.sep:
if sudo.path_isdir(dir_path):
sudo.chmod_extended(dir_path, cd_access+"+rx")