| Index: tools/android/loading/common_util.py
|
| diff --git a/tools/android/loading/common_util.py b/tools/android/loading/common_util.py
|
| index 855284fdcf5761b43190047ac6ae5440cb1614f8..350a418ed8410533cf4ee016223409c7b07d6cc9 100644
|
| --- a/tools/android/loading/common_util.py
|
| +++ b/tools/android/loading/common_util.py
|
| @@ -89,3 +89,10 @@ def TemporaryDirectory():
|
| yield name
|
| finally:
|
| shutil.rmtree(name)
|
| +
|
| +
|
| +def EnsureParentDirectoryExists(path):
|
| + """Verifies that the parent directory exists or creates it if missing."""
|
| + parent_directory_path = os.path.abspath(os.path.dirname(path))
|
| + if not os.path.isdir(parent_directory_path):
|
| + os.makedirs(parent_directory_path)
|
|
|