Merged V1.3 to HEAD (3180:3203, 3204:3217)

svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3180 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3203 .
   svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3204 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3217 .


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3407 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-07-26 11:00:06 +00:00
parent 595556f3c5
commit f4e00169ab
40 changed files with 1155 additions and 643 deletions

View File

@@ -19,7 +19,9 @@ package org.alfresco.filesys.smb.server.repo;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.List;
import javax.transaction.UserTransaction;
@@ -352,7 +354,22 @@ public class ContentDiskDriver implements DiskInterface, IOCtlInterface
URL appURL = this.getClass().getClassLoader().getResource(appPath.getValue());
if ( appURL == null)
throw new DeviceContextException("Failed to find drag and drop application, " + appPath.getValue());
File appFile = new File(appURL.getFile());
// Decode the URL path, it might contain escaped characters
String appURLPath = null;
try
{
appURLPath = URLDecoder.decode( appURL.getFile(), "UTF-8");
}
catch ( UnsupportedEncodingException ex)
{
throw new DeviceContextException("Failed to decode drag/drop path, " + ex.getMessage());
}
// Check that the drag/drop file exists
File appFile = new File(appURLPath);
if ( appFile.exists() == false)
throw new DeviceContextException("Drag and drop application not found, " + appPath.getValue());