make the extension check more generic
git-svn-id: file:///home/svn/framework3/trunk@9218 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
81f9b0285f
commit
2e926a1c22
|
@ -26,8 +26,8 @@ def upload(session,file,trgloc = "")
|
|||
location = trgloc
|
||||
end
|
||||
begin
|
||||
ext = file.scan(/\S*(\.exe|\.bat|\.com|\.vbs|\.cmd)/i)
|
||||
if ext.join == ".exe"
|
||||
ext = file[file.rindex(".") .. -1]
|
||||
if ext and ext.downcase == "exe"
|
||||
fileontrgt = "#{location}\\svhost#{rand(100)}.exe"
|
||||
else
|
||||
fileontrgt = "#{location}\\TMP#{rand(100)}#{ext}"
|
||||
|
|
Loading…
Reference in New Issue