using root directory C:\ fails on Windows 10
divinity76 opened this issue · 1 comments
divinity76 commented
i have a fairly standard
<?php
declare (strict_types = 1);
use Sabre\DAV;
// The autoloader
require 'vendor/autoload.php';
// Now we're creating a whole bunch of objects
$rootDirectory = new DAV\FS\Directory('C:');
// The server object is responsible for making sense out of the WebDAV protocol
$server = new DAV\Server($rootDirectory);
require_once __DIR__ . "/authentication.php";
// If your server is not on your webroot, make sure the following line has the
// correct information
$server->setBaseUri('/webdav/');
// The lock manager is reponsible for making sure users don't overwrite
// each others changes.
$lockBackend = new DAV\Locks\Backend\File('data/locks');
$lockPlugin = new DAV\Locks\Plugin($lockBackend);
$server->addPlugin($lockPlugin);
// This ensures that we get a pretty index in the browser, but it is
// optional.
$server->addPlugin(new DAV\Browser\Plugin());
// All we need to do now, is to fire up the server
$server->exec();
and have tried several variations of
$rootDirectory = new DAV\FS\Directory('C:');
$rootDirectory = new DAV\FS\Directory('C:\\');
$rootDirectory = new DAV\FS\Directory('C:/');
and pretty much all of them fail with some variation of
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:sabredav-version>3.2.2</s:sabredav-version>
<s:exception>Sabre\DAV\Exception\NotFound</s:exception>
<s:message>File with name C:/DumpStack.log.tmp could not be located</s:message>
</d:error>
DeepDiver1975 commented
solution given in #1460