[Geoserver-devel] [jira] Created: (GEOS-4578) resource loader createDirectory may fail to create directories without throwing

resource loader createDirectory may fail to create directories without throwing
--------------------------------------------------------------------------------

                 Key: GEOS-4578
                 URL: http://jira.codehaus.org/browse/GEOS-4578
             Project: GeoServer
          Issue Type: Bug
    Affects Versions: 2.1.0
            Reporter: Tim Schaub
            Assignee: Andrea Aime
            Priority: Minor
         Attachments: createDir.patch

The return on mkdirs in createDirectory is not checked so the method can fail to create directories without throwing.

I don't see other tests to crib from, so I'll attach a patch without. Basically, if you have a file named "foo" in your data dir and try to create a directory named "foo/bar" you can reproduce this.

{code}
// with a file named "foo" in the data dir
GeoServerResourceLoader resourceLoader = GeoServerExtensions.bean(GeoServerResourceLoader.class);
resourceLoader.findOrCreateDirectory("foo/bar"); // doesn't throw IOException
{code}

Patch attached against trunk at r15943.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira