Skip to content

Commit 545913b

Browse files
committed
fixed database storage path
1 parent df99298 commit 545913b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Commands/DatabaseBackup.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,12 @@ public function handle(Filesystem $filesystem, Dumper $dumper)
130130
$directory = (config('dbm.backup.dir', 'backups') != '')
131131
? DIRECTORY_SEPARATOR . config('dbm.backup.dir', 'backups')
132132
: '';
133-
$directoryPath = DBM::getPathPrefix() . $directory . DIRECTORY_SEPARATOR . $driver;
133+
$directoryPath = storage_path('app') . $directory . DIRECTORY_SEPARATOR . $driver;
134134
$filePath = $directoryPath . DIRECTORY_SEPARATOR . $this->getFileName($table, $database);
135135

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

138138
File::makeDirectory($directoryPath, 0777, true, true);
139-
140139
}
141140

142141
$this->backup($dumper, [

src/Commands/DatabaseRestore.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function handle(Filesystem $filesystem, Dumper $dumper)
7979
$path = $files[0];
8080
}
8181

82-
$filePath = DBM::getPathPrefix() . DIRECTORY_SEPARATOR . $path;
82+
$filePath = storage_path('app') . DIRECTORY_SEPARATOR . $path;
8383

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

0 commit comments

Comments
 (0)