summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxwu2012-02-08 04:27:08 (EST)
committer mwu2012-02-08 04:27:08 (EST)
commit2ef4b536bc225c453ae57c2a40f96f4ba3a55864 (patch)
tree3515257a7f9717b826c3c92a588f890d1454eefb
parentc4ab4c02c0fd7304d78468ba6b0b1b0115f4a7ad (diff)
downloadorg.eclipse.birt-2ef4b536bc225c453ae57c2a40f96f4ba3a55864.zip
org.eclipse.birt-2ef4b536bc225c453ae57c2a40f96f4ba3a55864.tar.gz
org.eclipse.birt-2ef4b536bc225c453ae57c2a40f96f4ba3a55864.tar.bz2
- Summary:
Fixed [Issue 47260] DTPUtil not encoding URI on linux correctly. - Description of Issue: DTPUtil not encoding URI on linux correctly. - Description or Resolution: If the resource folder location is absolute, then use new File( location ).toURI() as the returned value. - TED(s) Resolved: [Issue 47260] - Regression ( Yes/No ): NO - Code Owner Team: Birt DTE - Code Reviewers: Bin Feng - Project ID: 1577 - Manual Test Description: Tested. - Tests Automated Cases Executed: None - Special Notes: None
-rw-r--r--UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/util/DTPUtil.java27
1 files changed, 20 insertions, 7 deletions
diff --git a/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/util/DTPUtil.java b/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/util/DTPUtil.java
index e2105cf..9f0cd9e 100644
--- a/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/util/DTPUtil.java
+++ b/UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/util/DTPUtil.java
@@ -417,16 +417,24 @@ public class DTPUtil
if ( handle != null )
{
String rscFolder = handle.getResourceFolder( );
- try
+ File file = new File( rscFolder );
+ if ( file.isAbsolute( ) )
{
- return new URI( rscFolder );
+ return file.toURI( );
}
- catch ( URISyntaxException ex )
+ else
{
- return new URI( null,
- null,
- convertURI( rscFolder ),
- null );
+ try
+ {
+ return new URI( rscFolder );
+ }
+ catch ( URISyntaxException ex )
+ {
+ return new URI( null,
+ null,
+ convertURI( rscFolder ),
+ null );
+ }
}
}
}
@@ -440,6 +448,11 @@ public class DTPUtil
String rscFolder = ReportPlugin.getDefault( )
.getResourceFolder( getCurrentProject( ),
(ModuleHandle) null );
+ File file = new File( rscFolder );
+ if ( file.isAbsolute( ) )
+ {
+ return file.toURI( );
+ }
try
{
return new URI( rscFolder );