lyonplus / gettext-commons

Automatically exported from code.google.com/p/gettext-commons
GNU Lesser General Public License v2.1
0 stars 0 forks source link

AbstractGettextTask.getParentPath() doesn't like locationPath == parent.getAbsolutePath() #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

This Ant snippet will throw a StringIndexOutOfBoundsException in
gettext-ant-tasks 0.9.2 and 0.9.3:

    <gettext-extract keysFile="foo.pot" poDirectory="po"
                     keywords="-k -ktrc -ktr -kmarktr -ktrn:1,2 -ktrl">
      <fileset dir="." includes="foo*.java"/>
    </gettext-extract>

What is the expected output? What do you see instead?

It should start processing the files:

[gettext-extract] Executing: xgettext -c --from-code=utf-8 ...

Instead, it crashes, apparently while processing the file names:

BUILD FAILED
/home/marko/private/scratch/osm/josm/i18n/build.xml:42:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1

What version of the product are you using? On what operating system?

0.9.2, 0.9.3 on Debian GNU/Linux

Please provide any additional information below.

Please consider applying the attached patch.

Original issue reported on code.google.com by msmak...@gmail.com on 24 Jan 2009 at 10:48

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the report and the patch, looking at it now.

Original comment by berge...@gmail.com on 26 Jan 2009 at 9:44

GoogleCodeExporter commented 8 years ago
A new version 0.9.4 of Gettext Ant Tasks has been released, thank you for your
contribution!

Original comment by berge...@gmail.com on 27 Jan 2009 at 1:30