From 4a2e25cfc102fe0bacde7aadc4524cf2eb9db3e3 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 7 May 2019 18:21:15 +0200 Subject: [PATCH] Enfore unified directory separators for project path Close #2925 --- .../files/lib/acp/form/DevtoolsProjectAddForm.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php b/wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php index 0fb83b47b3..2b7f38fd43 100644 --- a/wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/DevtoolsProjectAddForm.class.php @@ -136,8 +136,13 @@ 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() ?? '')); + // ensure that unified directory separators are used + // and that there is a trailing slash + $formField->value( + FileUtil::addTrailingSlash( + FileUtil::unifyDirSeparator($formField->getSaveValue() ?? '') + ) + ); $path = $formField->getSaveValue(); -- 2.20.1