From: shingil.kang Date: Wed, 5 Feb 2014 10:24:56 +0000 (+0900) Subject: CLI: Get the proper path from URL on windows X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F32%2F16032%2F2;p=sdk%2Ftools%2Fcli.git 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 --- 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("!"))