@@ 970-975 (lines=6) @@ | ||
967 | public static function checkDataDirectoryValidity($dataDirectory) { |
|
968 | $l = \OC::$server->getL10N('lib'); |
|
969 | $errors = []; |
|
970 | if ($dataDirectory[0] !== '/') { |
|
971 | $errors[] = [ |
|
972 | 'error' => $l->t('Your Data directory must be an absolute path'), |
|
973 | 'hint' => $l->t('Check the value of "datadirectory" in your configuration') |
|
974 | ]; |
|
975 | } |
|
976 | if (!\file_exists($dataDirectory . '/.ocdata')) { |
|
977 | $errors[] = [ |
|
978 | 'error' => $l->t('Your Data directory is invalid'), |
|
@@ 976-982 (lines=7) @@ | ||
973 | 'hint' => $l->t('Check the value of "datadirectory" in your configuration') |
|
974 | ]; |
|
975 | } |
|
976 | if (!\file_exists($dataDirectory . '/.ocdata')) { |
|
977 | $errors[] = [ |
|
978 | 'error' => $l->t('Your Data directory is invalid'), |
|
979 | 'hint' => $l->t('Please check that the data directory contains a file' . |
|
980 | ' ".ocdata" in its root.') |
|
981 | ]; |
|
982 | } |
|
983 | return $errors; |
|
984 | } |
|
985 |