﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2635	asp connector link quickupload adds extra slash	John Crowley		"To reproduce, select some text, use the add link button, then switch the tab to the quick upload, and upload a file. Switch back to the  an extra / character is inserted into the path.  

I found that the value of ""currentFolder"" was a backslash. The CombinePaths function was appending a forward slash, then a second call to CombinePaths inserted an extra / again. The value of the path became <dir>\//<filename>.
This caused the url to display as <dir>//<filename>.

The fix I applied was to test currentFolder for a ""\"" and convert it into a ""/"" in commands.asp.

So I added one line to the end of FileUpload() in filemanager/connectors/asp/commands.asp.

I only use the asp version, so I did not test if this bug exists in other versions.  

Also, I noticed that if you use the browser to upload and select a file, the path is urlencoded, but if you use the quickupload, the path is raw.  Not a big deal, but inconsistent.

Code for my fix follows:

Set oUploader	= Nothing

dim sFileUrl

if currentFolder = ""\"" then currentFolder = ""/""  ' ADD THIS LINE

sFileUrl = CombinePaths( GetResourceTypePath( resourceType, sCommand ) ,  currentFolder  )
sFileUrl = CombinePaths(  sFileUrl , sFileName )

SendUploadResults sErrorNumber, sFileUrl, sFileName, """"

"	Bug	closed	Normal		General		duplicate		
