Code Duplication    Length = 6-7 lines in 2 locations

lib/private/legacy/util.php 2 locations

@@ 1030-1035 (lines=6) @@
1027
	public static function checkDataDirectoryValidity($dataDirectory) {
1028
		$l = \OC::$server->getL10N('lib');
1029
		$errors = [];
1030
		if ($dataDirectory[0] !== '/') {
1031
			$errors[] = [
1032
				'error' => $l->t('Your data directory must be an absolute path'),
1033
				'hint' => $l->t('Check the value of "datadirectory" in your configuration')
1034
			];
1035
		}
1036
		if (!file_exists($dataDirectory . '/.ocdata')) {
1037
			$errors[] = [
1038
				'error' => $l->t('Your data directory is invalid'),
@@ 1036-1042 (lines=7) @@
1033
				'hint' => $l->t('Check the value of "datadirectory" in your configuration')
1034
			];
1035
		}
1036
		if (!file_exists($dataDirectory . '/.ocdata')) {
1037
			$errors[] = [
1038
				'error' => $l->t('Your data directory is invalid'),
1039
				'hint' => $l->t('Ensure there is a file called ".ocdata"' .
1040
					' in the root of the data directory.')
1041
			];
1042
		}
1043
		return $errors;
1044
	}
1045