dbName = empty($config['dbname']) ? ConnectionFactory::DEFAULT_DBNAME : $config['dbname']; $this->tablePrefix = empty($config['dbtableprefix']) ? ConnectionFactory::DEFAULT_DBTABLEPREFIX : $config['dbtableprefix']; if ($this->dbName !== ConnectionFactory::DEFAULT_DBNAME) { $this->config->setValue('dbname', $this->dbName); } if ($this->tablePrefix !== ConnectionFactory::DEFAULT_DBTABLEPREFIX) { $this->config->setValue('dbtableprefix', $this->tablePrefix); } } public function setupDatabase($username) { $datadir = $this->config->getValue( 'datadirectory', \OC::$SERVERROOT . '/data' ); $sqliteFile = $datadir . '/' . $this->dbName . 'db'; if (file_exists($sqliteFile)) { unlink($sqliteFile); } } }