diff options
author | Robin Appelman <robin@icewind.nl> | 2017-10-16 16:15:15 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-11-07 14:46:29 +0100 |
commit | 7ea06dacb112e5921d9decaa0e7db14e9a8acc20 (patch) | |
tree | f1430ff449ae0b2e66cc91b4521110d0d253e5b7 /apps/files/js/filelist.js | |
parent | aa789989bfb37b9f8342b4539cf25478ff10288f (diff) | |
download | nextcloud-server-7ea06dacb112e5921d9decaa0e7db14e9a8acc20.tar.gz nextcloud-server-7ea06dacb112e5921d9decaa0e7db14e9a8acc20.zip |
still trigger conflict resolution for existing entries when the current entry doesn't need it
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r-- | apps/files/js/filelist.js | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 4790afcf4d0..1d2afc74de9 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1249,23 +1249,24 @@ 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) { - // 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); + 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 + '/'; + if (conflictPath.charAt(0) === '/') { + conflictPath = conflictPath.substr(1); + } + if (path && path !== '/') { nameSpan.append($('<span></span>').addClass('conflict-path').text(conflictPath)); } } |