diff --git a/WebDAVAdapter.php b/WebDAVAdapter.php index 491cca0..8906bb4 100644 --- a/WebDAVAdapter.php +++ b/WebDAVAdapter.php @@ -336,7 +336,7 @@ public function move(string $source, string $destination, Config $config): void try { $response = $this->client->request('MOVE', '/' . ltrim($location, '/'), null, [ - 'Destination' => '/' . ltrim($newLocation, '/'), + 'Destination' => $this->client->getAbsoluteUrl('/' . ltrim($newLocation, '/')), ]); if ($response['statusCode'] < 200 || $response['statusCode'] >= 300) { @@ -372,7 +372,7 @@ public function copy(string $source, string $destination, Config $config): void try { $response = $this->client->request('COPY', '/' . ltrim($location, '/'), null, [ - 'Destination' => '/' . ltrim($newLocation, '/'), + 'Destination' => $this->client->getAbsoluteUrl('/' . ltrim($newLocation, '/')), ]); if ($response['statusCode'] < 200 || $response['statusCode'] >= 300) {