Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-144

Allow absolute filename with FileResourceLoader

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.3-rc1
    • 1.5
    • Engine
    • None
    • Operating System: All
      Platform: PC
    • 17379

    Description

      There is no way of providing an absolute path (e.g. c:\temp\wibble.tmp) to the
      FileResourceLoader because it always attempts to use the 2-argument File
      constructor (even if the path component is empty).

      The following fix resolves this problem:
      In FileResourceLoader.findTemplate replace:
      File file = new File( path, template );
      with
      File file = null;

      if("".equals(path))
      file = new File( template );
      else
      file = new File ( path, template );

      Note this does not introduce any security risks as the FileResourceLoader must
      be configured to search the empty ("") path.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            dale.peakall@fdgroup.com Dale Peakall
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment