fix Paste on RTE to decode URLs on resource files
diff --git a/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PasteAction.java b/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PasteAction.java
index c912c32..ad54d39 100644
--- a/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PasteAction.java
+++ b/org.eclipse.epf.richtext/src/org/eclipse/epf/richtext/actions/PasteAction.java
@@ -131,7 +131,7 @@
&& scheme
.equalsIgnoreCase(NetUtil.FILE_SCHEME)) {
String url = hrefURL.getPath();
- File srcFile = new File(url);
+ File srcFile = new File(NetUtil.decodeURL(url));
File tgtFile = null;
File tgtDir = null;
if (href.startsWith("#") || sourceURL.sameFile(hrefURL)) { //$NON-NLS-1$
@@ -163,9 +163,9 @@
File srcFile = null;
String authority = srcURL.getAuthority();
if (authority != null) {
- srcFile = new File(authority + srcURL.getPath());
+ srcFile = new File(NetUtil.decodeURL(authority + srcURL.getPath()));
} else {
- srcFile = new File(srcURL.getPath());
+ srcFile = new File(NetUtil.decodeURL(srcURL.getPath()));
}
File tgtFile = null;
File tgtDir = null;