Merge pull request #6846 from nextcloud/filelist-confict-path

still trigger conflict resolution for existing entries when the curre…
This commit is contained in:
Morris Jobke 2017-11-09 09:33:59 +01:00 committed by GitHub
commit 6b3975c23a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 14 deletions

View File

@ -1249,7 +1249,7 @@
var nameSpan=$('<span></span>').addClass('nametext');
var innernameSpan = $('<span></span>').addClass('innernametext').text(basename);
if (path && path !== '/') {
var conflictingItems = this.$fileList.find('tr[data-file="' + this._jqSelEscape(name) + '"]');
if (conflictingItems.length !== 0) {
if (conflictingItems.length === 1) {
@ -1259,13 +1259,16 @@
if (firstConflictPath.charAt(0) === '/') {
firstConflictPath = firstConflictPath.substr(1);
}
if (firstConflictPath && firstConflictPath !== '/') {
$firstConflict.find('td.filename span.innernametext').prepend($('<span></span>').addClass('conflict-path').text(firstConflictPath));
}
}
var conflictPath = path + '/';
if (conflictPath.charAt(0) === '/') {
conflictPath = conflictPath.substr(1);
}
if (path && path !== '/') {
nameSpan.append($('<span></span>').addClass('conflict-path').text(conflictPath));
}
}