From db35d39b677d2b66959bca321be6508311f3ae8d Mon Sep 17 00:00:00 2001 From: "shingil.kang" Date: Wed, 5 Feb 2014 19:24:56 +0900 Subject: [PATCH] CLI: Get the proper path from URL on windows when getting path from url, the path was not properly expressed on windows. Change-Id: I3111f12b36f34c7407c02e4480fc3545c577f181 Signed-off-by: shingil.kang --- .../tizen/ncli/ide/subcommands/CreateWebProjectCommand.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/org.tizen.ncli.ide/src/org/tizen/ncli/ide/subcommands/CreateWebProjectCommand.java b/org.tizen.ncli.ide/src/org/tizen/ncli/ide/subcommands/CreateWebProjectCommand.java index 5e9a4d1..abbc1ac 100644 --- a/org.tizen.ncli.ide/src/org/tizen/ncli/ide/subcommands/CreateWebProjectCommand.java +++ b/org.tizen.ncli.ide/src/org/tizen/ncli/ide/subcommands/CreateWebProjectCommand.java @@ -35,9 +35,11 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; +import java.net.URLDecoder; import java.util.Enumeration; import java.util.HashMap; import java.util.List; @@ -853,7 +855,16 @@ class ProjectGenUtil String urlPath = url.getPath(); - String templateLibPath = urlPath + File.separator; + String templateLibPath; + + try { + urlPath = URLDecoder.decode(urlPath, "utf-8"); + urlPath = new File(urlPath).getPath(); + templateLibPath = urlPath + File.separator; + } catch (UnsupportedEncodingException e) { + logger.error("not decode url path", e.getMessage()); + return null; + } // if the url is not expressed jar file if(urlPath.contains("!")) -- 2.7.4