diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | lib/private/db/adaptersqlsrv.php | 7 | ||||
-rw-r--r-- | lib/private/files/storage/home.php | 7 | ||||
-rw-r--r-- | tests/lib/helper.php | 3 |
4 files changed, 7 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore index be69107ca1f..8c8b61d701b 100644 --- a/.gitignore +++ b/.gitignore @@ -90,3 +90,5 @@ nbproject /tests/coverage* /tests/autoconfig* /tests/autotest* +/tests/data/lorem-copy.txt +/tests/data/testimage-copy.png diff --git a/lib/private/db/adaptersqlsrv.php b/lib/private/db/adaptersqlsrv.php index d0a67af28a7..a6bc0e21052 100644 --- a/lib/private/db/adaptersqlsrv.php +++ b/lib/private/db/adaptersqlsrv.php @@ -10,13 +10,6 @@ namespace OC\DB; class AdapterSQLSrv extends Adapter { - public function lastInsertId($table) { - if($table !== null) { - $table = $this->conn->replaceTablePrefix( $table ); - } - return $this->conn->lastInsertId($table); - } - public function fixupStatement($statement) { $statement = preg_replace( "/\`(.*?)`/", "[$1]", $statement ); $statement = str_ireplace( 'NOW()', 'CURRENT_TIMESTAMP', $statement ); diff --git a/lib/private/files/storage/home.php b/lib/private/files/storage/home.php index 47a76c1b840..bf1d6017cbf 100644 --- a/lib/private/files/storage/home.php +++ b/lib/private/files/storage/home.php @@ -19,10 +19,9 @@ class Home extends Local { public function __construct($arguments) { $this->user = $arguments['user']; - $this->datadir = $this->user->getHome(); - if (substr($this->datadir, -1) !== '/') { - $this->datadir .= '/'; - } + $datadir = $this->user->getHome(); + + parent::__construct(array('datadir' => $datadir)); } public function getId() { diff --git a/tests/lib/helper.php b/tests/lib/helper.php index babafab52c0..4311215795c 100644 --- a/tests/lib/helper.php +++ b/tests/lib/helper.php @@ -239,7 +239,8 @@ class Test_Helper extends PHPUnit_Framework_TestCase { return array( array(0, false, false, false), array(0, false, \OC::$SERVERROOT . '/tests/data/lorem.txt', false), - array(446, true, \OC::$SERVERROOT . '/tests/data/lorem.txt', \OC::$SERVERROOT . '/tests/data/lorem-copy.txt'), + array(filesize(\OC::$SERVERROOT . '/tests/data/lorem.txt'), true, \OC::$SERVERROOT . '/tests/data/lorem.txt', \OC::$SERVERROOT . '/tests/data/lorem-copy.txt'), + array(3670, true, \OC::$SERVERROOT . '/tests/data/testimage.png', \OC::$SERVERROOT . '/tests/data/testimage-copy.png'), ); } } |