Uploaded image for project: 'Texen'
  1. Texen
  2. TEXEN-13

Generator.parse fails, if the outputfile points to a directory, that does not exist.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.1
    • None

    Description

      The Texentask generates the outputdirectory, if it does not exist, but the Generator-Implementation lacks this feature for control templates like the following:

      1. control.vm
        $generator.parse("myTemplate.vm", "subdirectory/myTemplate.out")

      So either allow subclasses of TexenTask to use another Generator (1), or change the implementation of getWriter to allow the Generator to create absent directories(2).

      (1)
      line 486:
      Generator generator = createGenerator();

      protected Generator createGenerator() {
      return Generator.getInstance();
      }

      (2)
      public Writer getWriter(final String path, final String encoding) throws Exception {
      final File f = new File(path).getParentFile();
      if (!f.exists())

      { f.mkdirs(); }

      ..
      }

      Attachments

        1. GeneratorNotReallyASingleton.patch
          5 kB
          Sebastian Zarnekow

        Activity

          People

            Unassigned Unassigned
            szarnekow Sebastian Zarnekow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: