Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UnsatisfiedLinkError when path to plugin contains spaces. #18

Merged
merged 1 commit into from
Oct 25, 2013

Conversation

olivierdagenais
Copy link
Member

Convert URL to URI for decoding.
URI will decode entities when retrieving the path, something URL won't do. This makes a difference when the location was something like file:/C:/Program%20Files/Jenkins/.

Manual testing:

  1. Created a Windows 7 x64 VM.
  2. Downloaded Jenkins 1.536 for Windows and ran the installer, picking defaults.
  3. Installed the TFS plugin version 3.0.0.
  4. Created a job that used TFS as the SCM.
  5. Ran the job
    5.1. The job failed with an UnsatisfiedLinkError
    5.2. The value of the com.microsoft.tfs.jni.native.base-directory property looked like C:\Program%20Files%20(x86)\Jenkins\plugins\tfs\WEB-INF\lib\native
  6. Upgraded the TFS plugin to version 3.0.1-SNAPSHOT by restarting Jenkins.
  7. Ran the job again.
    7.1. The job suceeeded.
    7.2. The value of the com.microsoft.tfs.jni.native.base-directory property looked like C:\Program Files (x86)\Jenkins\plugins\tfs\WEB-INF\lib\native

URI will decode entities when retrieving the path, something URL won't
do.  This makes a difference when the location was something like
"file:/C:/Program%20Files/Jenkins/"
@cloudbees-pull-request-builder

plugins » tfs-plugin #16 SUCCESS
This pull request looks good

olivierdagenais added a commit that referenced this pull request Oct 25, 2013
Fix UnsatisfiedLinkError when path to plugin contains spaces.
@olivierdagenais olivierdagenais merged commit 333515c into master Oct 25, 2013
@olivierdagenais olivierdagenais deleted the fixWhenPathWithSpaces branch October 25, 2013 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants