Skip to content

Commit c96ede1

Browse files
Issue #1: Fixed Dropbox namespace copy paste fail
1 parent 1c6276c commit c96ede1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Backup/Sync/Dropbox.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ public function sync(Target $target, Result $result)
6767
{
6868
$sourcePath = $target->getPathnameCompressed();
6969
$dropboxPath = $this->path . $target->getFilenameCompressed();
70-
7170
$client = new \Dropbox\Client($this->token, "phpbu/1.1.0");
71+
$pathError = \Dropbox\Path::findErrorNonRoot($dropboxPath);
7272

73-
$pathError = \Dropbox\Path::findErrorNonRoot($dropboxPath);
7473
if ($pathError !== null) {
7574
throw new Exception('Invalid <dropbox-path>: ' . $pathError);
7675
}
@@ -82,7 +81,7 @@ public function sync(Target $target, Result $result)
8281

8382
try {
8483
$fp = fopen($sourcePath, 'rb');
85-
$res = $client->uploadFile($dropboxPath, dbx\WriteMode::add(), $fp, $size);
84+
$res = $client->uploadFile($dropboxPath, \Dropbox\WriteMode::add(), $fp, $size);
8685
fclose($fp);
8786
} catch (\Exception $e) {
8887
fclose($fp);

0 commit comments

Comments
 (0)