use a more descriptive error message when the user tries to create '/Shared'
This commit is contained in:
parent
a9735c8a6f
commit
8ed73e5ced
2 changed files with 3 additions and 3 deletions
|
@ -508,11 +508,11 @@ $(document).ready(function() {
|
|||
var checkInput = function () {
|
||||
var filename = input.val();
|
||||
if (type === 'web' && filename.length === 0) {
|
||||
throw t('files', 'URL cannot be empty.');
|
||||
throw t('files', 'URL cannot be empty');
|
||||
} else if (type !== 'web' && !Files.isFileNameValid(filename)) {
|
||||
// Files.isFileNameValid(filename) throws an exception itself
|
||||
} else if ($('#dir').val() === '/' && filename === 'Shared') {
|
||||
throw t('files','Invalid name. Usage of \'Shared\' is reserved by ownCloud');
|
||||
throw t('files', 'In the home folder \'Shared\' is a reserved filename');
|
||||
} else if (FileList.inList(filename)) {
|
||||
throw t('files', '{new_name} already exists', {new_name: filename});
|
||||
} else {
|
||||
|
|
|
@ -359,7 +359,7 @@ var FileList={
|
|||
if (!Files.isFileNameValid(filename)) {
|
||||
// Files.isFileNameValid(filename) throws an exception itself
|
||||
} else if($('#dir').val() === '/' && filename === 'Shared') {
|
||||
throw t('files','Invalid name. Usage of \'Shared\' is reserved by ownCloud');
|
||||
throw t('files','In the home folder \'Shared\' is a reserved filename');
|
||||
} else if (FileList.inList(filename)) {
|
||||
throw t('files', '{new_name} already exists', {new_name: filename});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue