fix activity log path

This commit is contained in:
Boy132 2025-09-05 14:54:55 +02:00
parent 3fc4cdaf29
commit 7b8ee258db

View File

@ -432,11 +432,12 @@ class ListFiles extends ListRecords
->modalSubmitActionLabel(trans('server/file.actions.new_file.create')) ->modalSubmitActionLabel(trans('server/file.actions.new_file.create'))
->action(function ($data) { ->action(function ($data) {
$path = join_paths($this->path, $data['name']); $path = join_paths($this->path, $data['name']);
try { try {
$this->getDaemonFileRepository()->putContent($path, $data['editor'] ?? ''); $this->getDaemonFileRepository()->putContent($path, $data['editor'] ?? '');
Activity::event('server:file.write') Activity::event('server:file.write')
->property('file', join_paths($path, $data['name'])) ->property('file', $path)
->log(); ->log();
} catch (FileExistsException) { } catch (FileExistsException) {
AlertBanner::make('file_already_exists') AlertBanner::make('file_already_exists')