Merge pull request #1590 from nextcloud/issue-1432-special-chars-on-name-conflict

Fix special characters when renaming to a conflict
This commit is contained in:
Morris Jobke 2016-10-03 16:47:20 +02:00 committed by GitHub
commit 62d5daa94f
2 changed files with 6 additions and 2 deletions

View File

@ -1941,7 +1941,9 @@
// Files.isFileNameValid(filename) throws an exception itself
OCA.Files.Files.isFileNameValid(filename);
if (self.inList(filename)) {
throw t('files', '{newName} already exists', {newName: filename});
throw t('files', '{newName} already exists', {newName: filename}, undefined, {
escape: false
});
}
}
return true;

View File

@ -146,7 +146,9 @@
if (!Files.isFileNameValid(filename)) {
// Files.isFileNameValid(filename) throws an exception itself
} else if (self.fileList.inList(filename)) {
throw t('files', '{newname} already exists', {newname: filename});
throw t('files', '{newName} already exists', {newName: filename}, undefined, {
escape: false
});
} else {
return true;
}