Author: michiel
Date: 2009-06-02 14:23:20 +0200 (Tue, 02 Jun 2009)
New Revision: 35573

Modified:
   
mmbase/trunk/src/org/mmbase/storage/implementation/database/DatabaseStorageManager.java
Log:
Throw a bit cleared error than 'cannot be found' if the file cannot be _written_

Modified: 
mmbase/trunk/src/org/mmbase/storage/implementation/database/DatabaseStorageManager.java
===================================================================
--- 
mmbase/trunk/src/org/mmbase/storage/implementation/database/DatabaseStorageManager.java
     2009-06-02 11:53:58 UTC (rev 35572)
+++ 
mmbase/trunk/src/org/mmbase/storage/implementation/database/DatabaseStorageManager.java
     2009-06-02 12:23:20 UTC (rev 35573)
@@ -862,6 +862,9 @@
             long size = 0L;
             //log.warn("Storing " + field + " for " + node.getNumber());
             InputStream in = node.getInputStreamValue(fieldName);
+            if (! binaryFile.canWrite()) {
+                throw new StorageException("The file " + binaryFile+ " is not 
writable");
+            }
             OutputStream out = new FileOutputStream(binaryFile);
             size += IOUtil.copy(in, out);
             out.close();

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to