fix host mounts for windows

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-05-21 21:33:07 +02:00
parent b4a8322a1a
commit 3c6cb85c74
3 changed files with 43 additions and 5 deletions

View file

@ -512,4 +512,24 @@ class ConfigurationManager
$config['timezone'] = '';
$this->WriteConfig($config);
}
public function isWindowsPath(string $path) : bool {
$windowsPath = '/host_mnt/';
if (str_starts_with($path, $windowsPath)) {
return true;
}
return false;
}
public function GetWindowsVolumeName(string $volumeName) : string {
$name = '';
if ($volumeName === $this->GetNextcloudDatadirMount()) {
$name = 'nextcloud_aio_nextcloud_data';
} elseif ($volumeName === $this->GetNextcloudMount()) {
$name = 'nextcloud_aio_nextcloud_mount';
} elseif ($volumeName === $this->GetBorgBackupHostLocation()) {
$name = 'nextcloud_aio_backup';
}
return $name;
}
}