Skip to content

Commit

Permalink
Fixed #2274
Browse files Browse the repository at this point in the history
  • Loading branch information
angrybrad committed Jan 5, 2018
1 parent da7faf2 commit 7e32413
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-v3.md
Expand Up @@ -7,6 +7,7 @@

### Fixed
- Fixed the position of asset folder toggles. ([#2264](https://github.com/craftcms/cms/issues/2264))
- Fixed a bug where default Craft database backups and restores would fail if there was a space in the file path. ([#2274](https://github.com/craftcms/cms/issues/2274))

## 3.0.0-RC4 - 2018-01-02

Expand Down
10 changes: 5 additions & 5 deletions src/db/mysql/Schema.php
Expand Up @@ -153,7 +153,7 @@ public function getDefaultBackupCommand(): string
}

$defaultArgs =
' --defaults-extra-file='.$this->_createDumpConfigFile().
' --defaults-extra-file="'.$this->_createDumpConfigFile().'"'.
' --add-drop-table'.
' --comments'.
' --create-options'.
Expand All @@ -167,15 +167,15 @@ public function getDefaultBackupCommand(): string
$defaultArgs.
' --single-transaction'.
' --no-data'.
' --result-file={file}'.
' --result-file="{file}"'.
' {database}';

$dataDump = 'mysqldump'.
$defaultArgs.
' --no-create-info'.
implode('', $defaultTableIgnoreList).
' {database}'.
' >> {file}';
' >> "{file}"';

return $schemaDump.' && '.$dataDump;
}
Expand All @@ -188,9 +188,9 @@ public function getDefaultBackupCommand(): string
public function getDefaultRestoreCommand(): string
{
return 'mysqldump'.
' --defaults-extra-file='.$this->_createDumpConfigFile().
' --defaults-extra-file="'.$this->_createDumpConfigFile().'"'.
' {database}'.
' < {file}';
' < "{file}"';
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/db/pgsql/Schema.php
Expand Up @@ -153,7 +153,7 @@ public function getDefaultBackupCommand()
' --username={user}'.
' --if-exists'.
' --clean'.
' --file={file}'.
' --file="{file}"'.
' --schema={schema}'.
implode('', $defaultTableIgnoreList);
}
Expand All @@ -171,7 +171,7 @@ public function getDefaultRestoreCommand(): string
' --port={port}'.
' --username={user}'.
' --no-password'.
' < {file}';
' < "{file}"';
}

/**
Expand Down

0 comments on commit 7e32413

Please sign in to comment.