From f320f4becc80da1bad6fca1e7af9a274573632e9 Mon Sep 17 00:00:00 2001 From: Johnathan Viduchinsky Date: Thu, 24 Dec 2020 16:21:28 +0200 Subject: [PATCH] changes file pattern for script downloader. last pattern failed to match files with . in the middle - like config.1.bash for example --- package/cloudshell/cm/customscript/domain/script_downloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/cloudshell/cm/customscript/domain/script_downloader.py b/package/cloudshell/cm/customscript/domain/script_downloader.py index ea89bd1..1eb018b 100644 --- a/package/cloudshell/cm/customscript/domain/script_downloader.py +++ b/package/cloudshell/cm/customscript/domain/script_downloader.py @@ -24,7 +24,7 @@ def __init__(self, logger, cancel_sampler): """ self.logger = logger self.cancel_sampler = cancel_sampler - self.filename_pattern = "(?P\s*[\w,\s-]+\.(sh|bash|ps1)\s*)" + self.filename_pattern = r'(?P^.*\.(sh|bash|ps1)$)' self.filename_patterns = { "content-disposition": "\s*((?i)inline|attachment|extension-token)\s*;\s*filename=" + self.filename_pattern, "x-artifactory-filename": self.filename_pattern