From c96ede17793587ddcb55c07b9fd33cfde4704f76 Mon Sep 17 00:00:00 2001 From: Sebastian Feldmann Date: Wed, 11 Feb 2015 23:35:57 +0100 Subject: [PATCH] Issue #1: Fixed Dropbox namespace copy paste fail --- src/Backup/Sync/Dropbox.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Backup/Sync/Dropbox.php b/src/Backup/Sync/Dropbox.php index b8f4a812..675e7d71 100644 --- a/src/Backup/Sync/Dropbox.php +++ b/src/Backup/Sync/Dropbox.php @@ -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 : ' . $pathError); } @@ -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);