Code Duplication    Length = 6-7 lines in 2 locations

lib/private/legacy/util.php 2 locations

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