Browse Source

make adaptive ending slash

fs
yggverse 7 months ago
parent
commit
e2ad81f3ba
  1. 9
      src/server.php

9
src/server.php

@ -77,10 +77,13 @@ if (!file_exists(PULSAR_SERVER_KEY)) @@ -77,10 +77,13 @@ if (!file_exists(PULSAR_SERVER_KEY))
// Init data directory
define(
'PULSAR_SERVER_DATA_DIRECTORY',
str_starts_with(
$config->data->directory,
rtrim(
str_starts_with(
$config->data->directory,
DIRECTORY_SEPARATOR
) ? $config->data->directory : PULSAR_SERVER_DIRECTORY . $config->data->directory,
DIRECTORY_SEPARATOR
) ? $config->data->directory : PULSAR_SERVER_DIRECTORY . $config->data->directory
) . DIRECTORY_SEPARATOR
);
if (!is_dir(PULSAR_SERVER_DATA_DIRECTORY))

Loading…
Cancel
Save