[Geoserver-devel] Freemarker template update via REST clears target folder

Hi,

I’ve already created a ticket (http://jira.codehaus.org/browse/GEOS-5533) but maybe someone have an idea about the issue.

Does anyone knows, why the directory is deleted whenever an org.geoserver.rest.util.RESTUtils.handleBinUpload(…) is called.

Otherwise I would fix it by deleting only the file instead of the directory.

Thanks in advance!

Yours sincerely.

Robin Pradel

System Ingenieur

IVU Traffic Technologies AG

Bundesallee 88, D-12161 Berlin

http://www.ivu.de

On Fri, Jan 4, 2013 at 5:45 PM, Robin Pradel <rpr@anonymised.com> wrote:

Does anyone knows, why the directory is deleted whenever an
org.geoserver.rest.util.RESTUtils.handleBinUpload(…) is called.

Otherwise I would fix it by deleting only the file instead of the directory.

Hi,

this is a critical issue...
RESTUtils.handleBinUpload is used in FreemarkerTemplateResource and in
StoreFileResource, but seems its behaviour is harmless in
StoreFileResource.
I've fixed the issue in FreemarkerTemplateResource, replacing the
usage of handleBinUpload with another local method:

https://github.com/geoserver/geoserver/pull/91

Unfortunately a stable version containing this bug has been released
few days ago.
Maybe we should consider creating another stable release as soon as
the bug is fixed?

--
Davide Savazzi