mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Third party subsystem failed to start if dir.root was a relative path
- due to Spring's conversion between Strings and Files - now own custom conversion routine is used git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14782 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -43,11 +43,13 @@ public class OpenOfficeURI
|
|||||||
* Instantiates a new open office URI.
|
* Instantiates a new open office URI.
|
||||||
*
|
*
|
||||||
* @param source
|
* @param source
|
||||||
* the source file to convert to a URI
|
* the source file name to convert to a URI
|
||||||
|
* @throws IOException
|
||||||
|
* if the string cannot be resolved to a canonical file path
|
||||||
*/
|
*/
|
||||||
public OpenOfficeURI(File source)
|
public OpenOfficeURI(String source) throws IOException
|
||||||
{
|
{
|
||||||
this.source = source;
|
this.source = new File(source).getCanonicalFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -57,15 +59,7 @@ public class OpenOfficeURI
|
|||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
String absolute;
|
String absolute = this.source.getAbsolutePath();
|
||||||
try
|
|
||||||
{
|
|
||||||
absolute = this.source.getCanonicalPath();
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
if (File.separatorChar != '/')
|
if (File.separatorChar != '/')
|
||||||
{
|
{
|
||||||
absolute = absolute.replace(File.separatorChar, '/');
|
absolute = absolute.replace(File.separatorChar, '/');
|
||||||
|
Reference in New Issue
Block a user