Merge pull request #2689 from andreas-p/fix-remote-conflict

Fix showConflict
This commit is contained in:
Lukas Reschke 2016-12-19 14:34:56 +01:00 committed by GitHub
commit 34fb313466

View file

@ -129,6 +129,16 @@ OC.FileUpload.prototype = {
return OC.joinPaths(this._targetFolder, this.getFile().relativePath || '');
},
/**
* Get full path for the target file,
* including relative path and file name.
*
* @return {String} full path
*/
getFullFilePath: function() {
return OC.joinPaths(this.getFullPath(), this.getFile().name);
},
/**
* Returns conflict resolution mode.
*
@ -508,9 +518,10 @@ OC.Uploader.prototype = _.extend({
return;
}
// retrieve more info about this file
this.filesClient.getFileInfo(fileUpload.getFullPath()).then(function(status, fileInfo) {
this.filesClient.getFileInfo(fileUpload.getFullFilePath()).then(function(status, fileInfo) {
var original = fileInfo;
var replacement = file;
original.directory = original.path;
OC.dialogs.fileexists(fileUpload, original, replacement, self);
});
},