create store directory if it's missing before initialising DAV
This commit is contained in:
parent
13c226bdbe
commit
35733ca013
@ -32,6 +32,9 @@ function cloud_init(&$a) {
|
|||||||
|
|
||||||
require_once('include/reddav.php');
|
require_once('include/reddav.php');
|
||||||
|
|
||||||
|
if(! is_dir('store'))
|
||||||
|
mkdir('store',STORAGE_DEFAULT_PERMISSIONS,false);
|
||||||
|
|
||||||
$which = null;
|
$which = null;
|
||||||
if(argc() > 1)
|
if(argc() > 1)
|
||||||
$which = argv(1);
|
$which = argv(1);
|
||||||
@ -74,7 +77,7 @@ function cloud_init(&$a) {
|
|||||||
|
|
||||||
$rootDirectory = new RedDirectory('/',$auth);
|
$rootDirectory = new RedDirectory('/',$auth);
|
||||||
$server = new DAV\Server($rootDirectory);
|
$server = new DAV\Server($rootDirectory);
|
||||||
$lockBackend = new DAV\Locks\Backend\File('store/data/locks');
|
$lockBackend = new DAV\Locks\Backend\File('store/[data]/locks');
|
||||||
$lockPlugin = new DAV\Locks\Plugin($lockBackend);
|
$lockPlugin = new DAV\Locks\Plugin($lockBackend);
|
||||||
|
|
||||||
$server->addPlugin($lockPlugin);
|
$server->addPlugin($lockPlugin);
|
||||||
|
Reference in New Issue
Block a user