taylor 02/05/16 15:07:32
Modified: src/java/org/apache/jetspeed/services/psmlmanager
CastorPsmlManagerService.java
Log:
Fixed bug in Castor PSML Service to only create a new file on save, not on load
Revision Changes Path
1.22 +19 -6
jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/CastorPsmlManagerService.java
Index: CastorPsmlManagerService.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/CastorPsmlManagerService.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- CastorPsmlManagerService.java 16 May 2002 20:00:43 -0000 1.21
+++ CastorPsmlManagerService.java 16 May 2002 22:07:32 -0000 1.22
@@ -118,7 +118,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Rapha�l Luta</a>
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Santiago Gala</a>
- * @version $Id: CastorPsmlManagerService.java,v 1.21 2002/05/16 20:00:43 taylor
Exp $
+ * @version $Id: CastorPsmlManagerService.java,v 1.22 2002/05/16 22:07:32 taylor
Exp $
*/
public class CastorPsmlManagerService extends TurbineBaseService
implements PsmlManagerService
@@ -521,6 +521,18 @@
if (doc == null) return false;
File f = getFile(fileOrUrl);
+
+ if (f == null)
+ {
+ String path = TurbineServlet.getRealPath(fileOrUrl);
+ if (null == path)
+ {
+ path = fileOrUrl;
+ }
+ f = new File(path);
+ }
+
+
FileWriter writer = null;
try
@@ -637,7 +649,8 @@
if (f.exists())
{
return f;
- }
+ }
+/*
else
{
// try as a relative path
@@ -653,7 +666,6 @@
return f;
}
-/*
// try through the disk cache
try
{
@@ -663,10 +675,11 @@
{
Log.error("PSMLManager: unabel to retrieve file from diskcache for
"+fileOrUrl,e);
}
-*/
- }
-
+
+ }
return f;
+*/
+ return null;
}
protected class DocumentWatcher extends Thread
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>