File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
cli/src/main/java/dev/starfix Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,6 @@ public int config() throws Exception {
4545
4646 @ Command (name = "clone" )
4747 public int cloneCmd (@ Parameters (index = "0" ) String url ) {
48- try {
49- url = URLDecoder .decode (url ,"UTF-8" );
50- }catch (UnsupportedEncodingException e ){
51- throw new IllegalStateException (e .getMessage (), e );
52- }
53-
5448 if (url .startsWith ("ide://" )) {
5549 // stripping out ide:// to simplify launcher scripts.
5650 url = url .substring (6 );
@@ -98,9 +92,9 @@ public int cloneCmd(@Parameters(index = "0") String url) {
9892 String temp = url .substring (url .indexOf ("blob/" )+5 );
9993 branch = temp .substring (0 ,temp .indexOf ("/" ));
10094 filePath = temp .substring (temp .indexOf ("/" )+1 );
95+ filePath = URLDecoder .decode (filePath ,"UTF-8" );
10196 url = url .substring (0 ,url .indexOf ("/blob" ));
10297 }
103-
10498 URI uri = new URI (url );
10599
106100 // extract name of repository
@@ -109,7 +103,6 @@ public int cloneCmd(@Parameters(index = "0") String url) {
109103
110104 String originUrl = url ;
111105 Path directory = Paths .get (clone_path , repo_name );
112-
113106 if (!Files .exists (directory )) // Check if the user cloned the repo previously and in that case no cloning is
114107 // needed
115108 gitClone (directory , originUrl );
You can’t perform that action at this time.
0 commit comments