Fix showConflict
use getFullFileName to show conflicting file add original.directory to make fileExists happy Signed-off-by: Andreas Pflug <dev@admin4.org>
This commit is contained in:
parent
3714a6aaf0
commit
c7fc010215
1 changed files with 12 additions and 1 deletions
|
@ -129,6 +129,16 @@ OC.FileUpload.prototype = {
|
||||||
return OC.joinPaths(this._targetFolder, this.getFile().relativePath || '');
|
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.
|
* Returns conflict resolution mode.
|
||||||
*
|
*
|
||||||
|
@ -508,9 +518,10 @@ OC.Uploader.prototype = _.extend({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// retrieve more info about this file
|
// 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 original = fileInfo;
|
||||||
var replacement = file;
|
var replacement = file;
|
||||||
|
original.directory = original.path;
|
||||||
OC.dialogs.fileexists(fileUpload, original, replacement, self);
|
OC.dialogs.fileexists(fileUpload, original, replacement, self);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue