add support for Windows paths

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-03-18 11:00:17 +01:00
parent 8fedcb4810
commit 95ba20d7f9
4 changed files with 13 additions and 10 deletions

View file

@ -283,6 +283,7 @@ class ConfigurationManager
$allowedPrefixes = [
'/mnt/',
'/media/',
'/host_mnt/',
];
$isValidPath = false;
@ -298,7 +299,7 @@ class ConfigurationManager
}
if(!$isValidPath) {
throw new InvalidSettingConfigurationException("The path must start with '/mnt/' or '/media/' or be equal to '/var/backups'.");
throw new InvalidSettingConfigurationException("The path must start with '/mnt/', '/media/' or '/host_mnt/' or be equal to '/var/backups'.");
}