|
@@ 1006-1011 (lines=6) @@
|
| 1003 |
|
public static function checkDataDirectoryValidity($dataDirectory) { |
| 1004 |
|
$l = \OC::$server->getL10N('lib'); |
| 1005 |
|
$errors = []; |
| 1006 |
|
if ($dataDirectory[0] !== '/') { |
| 1007 |
|
$errors[] = [ |
| 1008 |
|
'error' => $l->t('Your data directory must be an absolute path'), |
| 1009 |
|
'hint' => $l->t('Check the value of "datadirectory" in your configuration') |
| 1010 |
|
]; |
| 1011 |
|
} |
| 1012 |
|
if (!file_exists($dataDirectory . '/.ocdata')) { |
| 1013 |
|
$errors[] = [ |
| 1014 |
|
'error' => $l->t('Your data directory is invalid'), |
|
@@ 1012-1018 (lines=7) @@
|
| 1009 |
|
'hint' => $l->t('Check the value of "datadirectory" in your configuration') |
| 1010 |
|
]; |
| 1011 |
|
} |
| 1012 |
|
if (!file_exists($dataDirectory . '/.ocdata')) { |
| 1013 |
|
$errors[] = [ |
| 1014 |
|
'error' => $l->t('Your data directory is invalid'), |
| 1015 |
|
'hint' => $l->t('Ensure there is a file called ".ocdata"' . |
| 1016 |
|
' in the root of the data directory.') |
| 1017 |
|
]; |
| 1018 |
|
} |
| 1019 |
|
return $errors; |
| 1020 |
|
} |
| 1021 |
|
|