Author: byersa
Date: Tue Sep 18 00:43:19 2007
New Revision: 576751
URL:
http://svn.apache.org/viewvc?rev=576751&view=revLog:
writeDataResourceText was not getting rootDir correctly.
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=576751&r1=576750&r2=576751&view=diff==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java Tue Sep 18 00:43:19 2007
@@ -730,6 +730,12 @@
if (context != null)
https = (String) context.get("https");
}
+
+ String rootDir = (String) templateContext.get("rootDir");
+ if (UtilValidate.isEmpty(rootDir)) {
+ if (context != null)
+ rootDir = (String) context.get("rootDir");
+ }
String dataResourceId = dataResource.getString("dataResourceId");
String dataResourceTypeId = dataResource.getString("dataResourceTypeId");
@@ -790,7 +796,6 @@
} else if (dataResourceTypeId.endsWith("_FILE")) {
String dataResourceMimeTypeId = dataResource.getString("mimeTypeId");
String objectInfo = dataResource.getString("objectInfo");
- String rootDir = (String) context.get("rootDir");
if (dataResourceMimeTypeId == null || dataResourceMimeTypeId.startsWith("text")) {
renderFile(dataResourceTypeId, objectInfo, rootDir, out);