Browse Source

URI to cval file was wrong in Windows (#14629)

Change-Id: Ifdcf8bcaf6f613660b185501be92eec0b43700b5
tags/7.4.0.beta1
Manolo Carrasco 9 years ago
parent
commit
3a9aa4c277
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      client-compiler/src/com/vaadin/tools/CvalChecker.java

+ 5
- 4
client-compiler/src/com/vaadin/tools/CvalChecker.java View File



import static java.lang.Integer.parseInt; import static java.lang.Integer.parseInt;


import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.net.MalformedURLException; import java.net.MalformedURLException;


try { try {
String dotLicenseName = "." + licenseName; String dotLicenseName = "." + licenseName;
String userHome = "file://" + System.getProperty("user.home") + "/";
for (URL url : new URL[] { new URL(userHome + dotLicenseName),
new URL(userHome + licenseName),
String userHome = System.getProperty("user.home");
for (URL url : new URL[] {
new File(userHome, dotLicenseName).toURI().toURL(),
new File(userHome, licenseName).toURI().toURL(),
URL.class.getResource("/" + dotLicenseName), URL.class.getResource("/" + dotLicenseName),
URL.class.getResource("/" + licenseName) }) { URL.class.getResource("/" + licenseName) }) {

if (url != null) { if (url != null) {
try { try {
key = readKeyFromFile(url, key = readKeyFromFile(url,

Loading…
Cancel
Save