summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-01-27 14:28:07 +0000
committerRüdiger Timm <rt@openoffice.org>2005-01-27 14:28:07 +0000
commit48c918e8d50e755a8db5a777b14f49106937ac39 (patch)
treea447e227412a2b453cffc85d7981413280994449 /scripting
parent20a3ef622bf3275750607740744f12cf812f65dc (diff)
INTEGRATION: CWS scriptingf10 (1.3.32); FILE MERGED
2005/01/20 10:37:43 toconnor 1.3.32.1: #i39330# do not close if there is an error writing file
Diffstat (limited to 'scripting')
-rw-r--r--scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java b/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
index 1a7b818a60a7..9d7e590fb850 100644
--- a/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
+++ b/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java
@@ -2,9 +2,9 @@
*
* $RCSfile: UCBStreamHandler.java,v $
*
-* $Revision: 1.3 $
+* $Revision: 1.4 $
*
-* last change: $Author: hr $ $Date: 2004-07-23 14:00:14 $
+* last change: $Author: rt $ $Date: 2005-01-27 15:28:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -147,6 +147,12 @@ public class UCBStreamHandler extends URLStreamHandler {
String path = sUrl.substring(0, sUrl.lastIndexOf(separator));
String file = sUrl.substring(
sUrl.lastIndexOf(separator) + separator.length());
+
+ if ( m_xSimpleFileAccess.isReadOnly( path ) )
+ {
+ throw new java.io.IOException("File is read only");
+ }
+
LogUtils.DEBUG("getOutputStream, create o/p stream for file eg. " + path );
// we will only deal with simple file write