Author: kn
Date: Tue Oct 2 14:53:17 2007
New Revision: 6333
Log:
- Ensure creation of property storages
Modified:
trunk/Webdav/src/backends/file.php
trunk/Webdav/tests/backend_file_test.php
Modified: trunk/Webdav/src/backends/file.php
==============================================================================
--- trunk/Webdav/src/backends/file.php [iso-8859-1] (original)
+++ trunk/Webdav/src/backends/file.php [iso-8859-1] Tue Oct 2 14:53:17 2007
@@ -248,9 +248,11 @@
*/
protected function createCollection( $path )
{
- mkdir( $this->root . $path, $this->options->directoryMode );
-
- // @TODO: Also create property storage?
+ mkdir( $this->root . $path );
+ chmod( $this->root . $path, $this->options->directoryMode );
+
+ // This automatically creates the property storage
+ $storage = $this->getPropertyStoragePath( $path . '/foo' );
}
/**
@@ -268,7 +270,8 @@
file_put_contents( $this->root . $path, $content );
chmod( $this->root . $path, $this->options->fileMode );
- // @TODO: Also create property storage?
+ // This automatically creates the property storage if missing
+ $storage = $this->getPropertyStoragePath( $path );
}
/**
Modified: trunk/Webdav/tests/backend_file_test.php
==============================================================================
--- trunk/Webdav/tests/backend_file_test.php [iso-8859-1] (original)
+++ trunk/Webdav/tests/backend_file_test.php [iso-8859-1] Tue Oct 2 14:53:17
2007
@@ -1047,6 +1047,11 @@
$this->assertTrue(
is_dir( $this->tempDir . 'backend/collection/new_collection' ),
'Expected created collection.'
+ );
+
+ $this->assertTrue(
+ is_dir( $this->tempDir . 'backend/collection/new_collection/.ezc'
),
+ 'Expected property storage in directory.'
);
}
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components