still trigger conflict resolution for existing entries when the current entry doesn't need it
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
aa789989bf
commit
7ea06dacb1
|
@ -1249,23 +1249,24 @@
|
||||||
var nameSpan=$('<span></span>').addClass('nametext');
|
var nameSpan=$('<span></span>').addClass('nametext');
|
||||||
var innernameSpan = $('<span></span>').addClass('innernametext').text(basename);
|
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) {
|
|
||||||
// Update the path on the first conflicting item
|
|
||||||
var $firstConflict = $(conflictingItems[0]),
|
|
||||||
firstConflictPath = $firstConflict.attr('data-path') + '/';
|
|
||||||
if (firstConflictPath.charAt(0) === '/') {
|
|
||||||
firstConflictPath = firstConflictPath.substr(1);
|
|
||||||
}
|
|
||||||
$firstConflict.find('td.filename span.innernametext').prepend($('<span></span>').addClass('conflict-path').text(firstConflictPath));
|
|
||||||
}
|
|
||||||
|
|
||||||
var conflictPath = path + '/';
|
var conflictingItems = this.$fileList.find('tr[data-file="' + this._jqSelEscape(name) + '"]');
|
||||||
if (conflictPath.charAt(0) === '/') {
|
if (conflictingItems.length !== 0) {
|
||||||
conflictPath = conflictPath.substr(1);
|
if (conflictingItems.length === 1) {
|
||||||
|
// Update the path on the first conflicting item
|
||||||
|
var $firstConflict = $(conflictingItems[0]),
|
||||||
|
firstConflictPath = $firstConflict.attr('data-path') + '/';
|
||||||
|
if (firstConflictPath.charAt(0) === '/') {
|
||||||
|
firstConflictPath = firstConflictPath.substr(1);
|
||||||
}
|
}
|
||||||
|
$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));
|
nameSpan.append($('<span></span>').addClass('conflict-path').text(conflictPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue