From dd653dcbe37cb668589576e11405c41bad1e3960 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 12 Mar 2019 18:23:53 +0100 Subject: [PATCH] Fix importing package without trailing slash in path See #2772 --- .../files/lib/acp/form/DevtoolsProjectAddForm.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php b/wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php index 1b3622de37..09a2bb8e4d 100644 --- a/wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php @@ -136,6 +136,9 @@ class DevtoolsProjectAddForm extends AbstractFormBuilderForm { ->label('wcf.acp.devtools.project.path') ->required() ->addValidator(new FormFieldValidator('validPath', function (TextFormField $formField) { + // ensure that there is a trailing slash + $formField->value(FileUtil::addTrailingSlash($formField->getSaveValue() ?? '')); + $path = $formField->getSaveValue(); /** @var RadioButtonFormField $modeField */ -- 2.20.1