@@ -9,6 +9,9 @@ public class VCSRepositoryWorkspace implements IVCSRepositoryWorkspace {
9
9
private static final String UNPRINTABLE_CHAR_PLACEHOLDER = "_" ;
10
10
private static final String HTTP_PREFIX = "http" + String .join ("" , Collections .nCopies (3 , UNPRINTABLE_CHAR_PLACEHOLDER ));
11
11
private static final String HTTPS_PREFIX = "https" + String .join ("" , Collections .nCopies (3 , UNPRINTABLE_CHAR_PLACEHOLDER ));
12
+ private static final String FILE_PREFIX_1 = "file" + String .join ("" , Collections .nCopies (2 , UNPRINTABLE_CHAR_PLACEHOLDER ));
13
+ private static final String FILE_PREFIX_2 = "file" + String .join ("" , Collections .nCopies (3 , UNPRINTABLE_CHAR_PLACEHOLDER ));
14
+ private static final String FILE_PREFIX_3 = "file" + String .join ("" , Collections .nCopies (4 , UNPRINTABLE_CHAR_PLACEHOLDER ));
12
15
private final IVCSWorkspace workspace ;
13
16
private final String repoUrl ;
14
17
private File repoFolder ;
@@ -35,6 +38,12 @@ private String getRepoFolderName() {
35
38
tmp = tmp .substring (HTTPS_PREFIX .length ());
36
39
} else if (tmp .toLowerCase ().startsWith (HTTP_PREFIX )) {
37
40
tmp = tmp .substring (HTTP_PREFIX .length ());
41
+ } else if (tmp .toLowerCase ().startsWith (FILE_PREFIX_3 )) {
42
+ tmp = tmp .substring (FILE_PREFIX_3 .length ());
43
+ } else if (tmp .toLowerCase ().startsWith (FILE_PREFIX_2 )) {
44
+ tmp = tmp .substring (FILE_PREFIX_2 .length ());
45
+ } else if (tmp .toLowerCase ().startsWith (FILE_PREFIX_1 )) {
46
+ tmp = tmp .substring (FILE_PREFIX_1 .length ());
38
47
}
39
48
return new File (workspace .getHomeFolder (), tmp ).getPath ().replace ("\\ " , File .separator );
40
49
}
0 commit comments