Skip to content

Commit a6d9115

Browse files
committed
fix: file exist search when no file ext
1 parent c350adf commit a6d9115

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/modules/software_center_download.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ def run_module():
136136

137137
# Search directory and subdirectories for filename without file extension
138138
filename = query if query else download_filename
139-
pattern = dest + '/**/' + os.path.splitext(filename)[0] + '.*'
139+
pattern = dest + '/**/' + os.path.splitext(filename)[0] + '*'
140140
for file in glob.glob(pattern, recursive=True):
141141
if os.path.exists(file):
142-
module.exit_json(skipped=True, msg="file {} already exists".format(filename))
142+
module.exit_json(skipped=True, msg="file {} already exists".format(file))
143143

144144
# Initiate login with given credentials
145145
sap_sso_login(username, password)

0 commit comments

Comments
 (0)