Skip to content

Commit

Permalink
fixed database storage path
Browse files Browse the repository at this point in the history
  • Loading branch information
maab16 committed Jan 13, 2020
1 parent df99298 commit 545913b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/Commands/DatabaseBackup.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,12 @@ public function handle(Filesystem $filesystem, Dumper $dumper)
$directory = (config('dbm.backup.dir', 'backups') != '')
? DIRECTORY_SEPARATOR . config('dbm.backup.dir', 'backups')
: '';
$directoryPath = DBM::getPathPrefix() . $directory . DIRECTORY_SEPARATOR . $driver;
$directoryPath = storage_path('app') . $directory . DIRECTORY_SEPARATOR . $driver;
$filePath = $directoryPath . DIRECTORY_SEPARATOR . $this->getFileName($table, $database);

if (!File::isDirectory($directoryPath)) {

File::makeDirectory($directoryPath, 0777, true, true);

}

$this->backup($dumper, [
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/DatabaseRestore.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function handle(Filesystem $filesystem, Dumper $dumper)
$path = $files[0];
}

$filePath = DBM::getPathPrefix() . DIRECTORY_SEPARATOR . $path;
$filePath = storage_path('app') . DIRECTORY_SEPARATOR . $path;

$isCompress = config('dbm.backup.compress', false);
$compressBinaryPath = config('dbm.backup.compress_binary_path', "");
Expand Down

0 comments on commit 545913b

Please sign in to comment.