mirror of
https://github.com/Deathgarden-Rebirth/Deathgarden_Rebirth-Rewrite.git
synced 2026-04-25 16:15:23 -05:00
PAK Manager hotfix. Forgot to comment in some stuff and fixed file saving.
This commit is contained in:
parent
4287cdc0f6
commit
ee87b7e3c5
|
|
@ -59,7 +59,7 @@ public function store(Request $request)
|
|||
$gameFile->hash = $filehash;
|
||||
$gameFile->patchline = $request->input('patchline');
|
||||
|
||||
$file->storeAs(str($gameFile->patchline->name)->lower(), $gameFile->name, ['disk' => 'patches']);
|
||||
GameFile::getDisk()->putFileAs(strtolower($gameFile->patchline->name), $file, $gameFile->name);
|
||||
$uploadedFiles[] = $gameFile->name;
|
||||
|
||||
$gameFile->game_path = $request->game_path[$i];
|
||||
|
|
|
|||
14
dist/app/Models/GameFile.php
vendored
14
dist/app/Models/GameFile.php
vendored
|
|
@ -28,14 +28,12 @@ class GameFile extends Model
|
|||
|
||||
protected static ?FilesystemAdapter $disk = null;
|
||||
|
||||
// protected static function booted()
|
||||
// {
|
||||
// parent::booted();
|
||||
//
|
||||
// static::deleting(function (GameFile $gameFile) {
|
||||
// static::getDisk()->delete($gameFile->getDiskPath());
|
||||
// });
|
||||
// }
|
||||
protected static function booted()
|
||||
{
|
||||
static::deleting(function (GameFile $gameFile) {
|
||||
static::getDisk()->delete($gameFile->getDiskPath());
|
||||
});
|
||||
}
|
||||
|
||||
public static function getDisk():FileSystemAdapter {
|
||||
return static::$disk ?? static::$disk = Storage::disk('patches');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user