mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2026-03-03 03:07:01 +00:00
Ensure proper cleanup on hosted
This commit is contained in:
@@ -552,7 +552,23 @@ class CompanyController extends BaseController
|
||||
});
|
||||
|
||||
try {
|
||||
Storage::disk(config('filesystems.default'))->deleteDirectory($company->company_key);
|
||||
|
||||
if(Ninja::isHosted()){
|
||||
try{
|
||||
Storage::disk('s3')->deleteDirectory($company->company_key);
|
||||
}
|
||||
catch(\Throwable $th){}
|
||||
|
||||
try{
|
||||
Storage::disk('backup')->deleteDirectory($company->company_key);
|
||||
}
|
||||
catch(\Throwable $th){}
|
||||
|
||||
}
|
||||
else {
|
||||
Storage::disk(config('filesystems.default'))->deleteDirectory($company->company_key);
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user