Skip to content

Commit

Permalink
Safely convert URI to File
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierdagenais committed Nov 19, 2013
1 parent f61f3fc commit e0a5488
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/hudson/plugins/tfs/model/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ static synchronized void ensureNativeLibrariesConfigured() {
// TODO: consider logging this situation if it ever happens
return;
}
final String stringPathToJar = locationUri.getPath();
final File pathToJar = new File(stringPathToJar);
final File pathToJar = new File(locationUri);
final File pathToLibFolder = pathToJar.getParentFile();
final File pathToNativeFolder = new File(pathToLibFolder, "native");
System.setProperty(nativeFolderPropertyName, pathToNativeFolder.toString());
Expand Down

0 comments on commit e0a5488

Please sign in to comment.