Skip to content

Commit

Permalink
Issue #1: Fixed Dropbox namespace copy paste fail
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianfeldmann committed Feb 11, 2015
1 parent 1c6276c commit c96ede1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Backup/Sync/Dropbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@ public function sync(Target $target, Result $result)
{
$sourcePath = $target->getPathnameCompressed();
$dropboxPath = $this->path . $target->getFilenameCompressed();

$client = new \Dropbox\Client($this->token, "phpbu/1.1.0");
$pathError = \Dropbox\Path::findErrorNonRoot($dropboxPath);

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

try {
$fp = fopen($sourcePath, 'rb');
$res = $client->uploadFile($dropboxPath, dbx\WriteMode::add(), $fp, $size);
$res = $client->uploadFile($dropboxPath, \Dropbox\WriteMode::add(), $fp, $size);
fclose($fp);
} catch (\Exception $e) {
fclose($fp);
Expand Down

0 comments on commit c96ede1

Please sign in to comment.