summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-10-16 16:15:15 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-11-07 15:54:07 +0100
commite51acfc717bd55e48eba0d886b14becbbe323b8a (patch)
treeef6de02dc4adb354ee88dd5bab1b7189bab74ad5 /apps/files/js
parent70e20727e5dc69a7bc9ac67708ebb6bafe17a712 (diff)
downloadnextcloud-server-e51acfc717bd55e48eba0d886b14becbbe323b8a.tar.gz
nextcloud-server-e51acfc717bd55e48eba0d886b14becbbe323b8a.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')
-rw-r--r--apps/files/js/filelist.js31
1 files changed, 16 insertions, 15 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index a94d0ac7281..857865c7111 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1204,23 +1204,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));
}
}