Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12331

Util.createSymlink() doesn't work as expected if symlink should be created in a different directory

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • None
    • Jenkins 1.448-SNAPSHOT, Ubuntu 10.04

      If one wants to create a symlink in another directory this fails as the link points to the targetPath in the other directory instead of the base directory.
      E.g.
      Util.createSymlink(base,"file","anotherDir/link",l);
      will create a link in base/anotherDir/link pointing to base/anotherDir/file instead of base/file.

      The Javadoc of createSymlink doesn't explicitly imply that this should work, but on the other hand it also doesn't says that it doesn't ...

      In the same way Util.resolveSymlink for anotherDir/link returns "file" instead of "anotherDir/file" as one might expect - however, in fact the Javadoc of resolveSymlink doesn't say anything about what is returned.

      See also the disabled parts of the testSymlink and testIsSymlink methods in UtilTest

            Unassigned Unassigned
            kutzi kutzi
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: