Issue Type: Bug Bug
Affects Versions: 2.2.3
Assignee: Andrea Aime
Components: REST
Created: 04/Jan/13 10:30 AM
Description:

The freemarker template [GEOSERVER_WEBAPP_DIR]/data/workspaces/content.ftl should be updated via PUT request on http://localhost:8081/geoserver/rest/templates/content.ftl

When submitting this request, the whole workspaces folder will be cleared. This is caused by the call of org.geoserver.rest.util.RESTUtils.handleBinUpload(...) : 101

final File newFile = new File(directory, fileName);
if (newFile.exists()) {
  FileUtils.cleanDirectory(directory);
}

Instead of removing the existing file, the whole directory is affected.
This code was created for GEOS-3973 but I don't understand it.


There is a workaround by delete primary the file with a DELETE request and afterwards putting the file again. This means a lack of consistency for instance by failing of the PUT. The server will then remain with no template file.

Environment: Windows 7 64bit
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
Apache Tomcat 7.0.26
Project: GeoServer
Priority: Major Major
Reporter: Robin Pradel
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to