Skip to content

Commit 21e5d92

Browse files
authored
Remove trailing slash from source path before extracting from archive (#1420)
1 parent 8ec0386 commit 21e5d92

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

core/src/main/python/wlsdeploy/tool/deploy/applications_deployer.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,12 @@ def __extract_source_path_from_archive(self, source_path, model_type, model_name
12451245
:param model_name: the element name (my-app, etc.), used for logging
12461246
"""
12471247
_method_name = '__extract_source_path_from_archive'
1248-
# source path may be may be a single file (jar, war, etc.)
1248+
1249+
# model may have trailing slash on exploded source path
1250+
if source_path.endswith('/'):
1251+
source_path = source_path[:-1]
1252+
1253+
# source path may be a single file (jar, war, etc.)
12491254
if self.archive_helper.contains_file(source_path):
12501255
if is_remote:
12511256
self.archive_helper.extract_file(source_path, upload_remote_directory, False)
@@ -1307,7 +1312,7 @@ def _fix_plan_file(self, plan_dir, plan_path):
13071312
plan_file_name = 'plan.xml'
13081313
if plan_path is not None and len(str_helper.to_string(plan_path)) > 0:
13091314
plan_file_name = plan_path
1310-
1315+
13111316
plan_file = os.path.join(self.model_context.get_domain_home(), plan_dir, plan_file_name)
13121317
dbf = DocumentBuilderFactory.newInstance()
13131318
db = dbf.newDocumentBuilder()

0 commit comments

Comments
 (0)