File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments