diff --git a/source/java/org/alfresco/filesys/avm/AVMDiskDriver.java b/source/java/org/alfresco/filesys/avm/AVMDiskDriver.java index 8edfc9bcc8..aeb6e2b1d8 100644 --- a/source/java/org/alfresco/filesys/avm/AVMDiskDriver.java +++ b/source/java/org/alfresco/filesys/avm/AVMDiskDriver.java @@ -1510,11 +1510,11 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface { if ( file.isDirectory()) throw new AccessDeniedException(); - // If the content channel is not open for the file then start a transaction + // If the content channel is not open for the file, or the channel is not writable, then start a transaction AVMNetworkFile avmFile = (AVMNetworkFile) file; - if ( avmFile.hasContentChannel() == false) + if ( avmFile.hasContentChannel() == false || avmFile.isWritable() == false) sess.beginTransaction( m_transactionService, true); // Write the data to the file diff --git a/source/java/org/alfresco/filesys/avm/AVMNetworkFile.java b/source/java/org/alfresco/filesys/avm/AVMNetworkFile.java index 573b2d7485..ff1ea30e9f 100644 --- a/source/java/org/alfresco/filesys/avm/AVMNetworkFile.java +++ b/source/java/org/alfresco/filesys/avm/AVMNetworkFile.java @@ -467,6 +467,16 @@ public class AVMNetworkFile extends NetworkFile { } } + /** + * Return the writable state of the content channel + * + * @return boolean + */ + public final boolean isWritable() + { + return m_writable; + } + /** * Return the network file details as a string *